Skip to content

Commit

Permalink
chore(mongodb-constants): add 7.1/7.2 aggregation autocomplete updates (
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax authored Jan 29, 2024
1 parent f123f6d commit e08b5e7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
7 changes: 7 additions & 0 deletions packages/mongodb-constants/src/expression-operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,13 @@ const EXPRESSION_OPERATORS = [
meta: 'expr:cond',
version: '3.4.0',
},
{
name: '$toHashedIndexKey',
value: '$toHashedIndexKey',
score: 1,
meta: 'expr:arith',
version: '4.2.24',
},
{
name: '$toLower',
value: '$toLower',
Expand Down
14 changes: 12 additions & 2 deletions packages/mongodb-constants/src/stage-operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,11 +651,21 @@ const STAGE_OPERATORS = [
description:
'Writes the result of a pipeline to a new or existing collection.',
comment: `/**
* Provide the name of the output collection.
* Provide the name of the output database and collection.
*/
`,
// eslint-disable-next-line quotes
snippet: `'\${1:string}'`,
snippet: `{
db: '\${1:string}',
coll: '\${2:string}',
/*
timeseries: {
timeField: '\${3:field}',
bucketMaxSpanSeconds: '\${4:number}',
granularity: '\${5:granularity}'
}
*/
}`,
},
{
name: '$out',
Expand Down

0 comments on commit e08b5e7

Please sign in to comment.