@valkey/valkey-glide-darwin-arm64 1.2.0 → 1.2.1-rc0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-ts/src/BaseClient.d.ts +27 -1
- package/build-ts/src/BaseClient.js +9 -1
- package/build-ts/src/BaseClient.js.map +1 -1
- package/build-ts/src/Commands.d.ts +12 -0
- package/build-ts/src/Commands.js.map +1 -1
- package/build-ts/src/GlideClient.d.ts +17 -1
- package/build-ts/src/GlideClient.js +3 -0
- package/build-ts/src/GlideClient.js.map +1 -1
- package/build-ts/src/GlideClusterClient.d.ts +23 -7
- package/build-ts/src/GlideClusterClient.js +8 -3
- package/build-ts/src/GlideClusterClient.js.map +1 -1
- package/build-ts/src/ProtobufMessage.js +46 -1
- package/build-ts/src/ProtobufMessage.js.map +1 -1
- package/node_modules/glide-rs/glide-rs.darwin-arm64.node +0 -0
- package/node_modules/glide-rs/index.d.ts +2 -1
- package/node_modules/glide-rs/index.js +4 -2
- package/npm/glide/index.ts +4 -3
- package/npm/glide/package.json +0 -1
- package/package.json +2 -2
- package/rust-client/node_modules/mingo/README.md +58 -53
- package/rust-client/node_modules/mingo/dist/cjs/aggregator.js +18 -20
- package/rust-client/node_modules/mingo/dist/cjs/core.js +179 -190
- package/rust-client/node_modules/mingo/dist/cjs/cursor.js +34 -34
- package/rust-client/node_modules/mingo/dist/cjs/index.js +11 -3
- package/rust-client/node_modules/mingo/dist/cjs/init/basic.js +4 -22
- package/rust-client/node_modules/mingo/dist/cjs/init/system.js +6 -6
- package/rust-client/node_modules/mingo/dist/cjs/lazy.js +58 -61
- package/rust-client/node_modules/mingo/dist/cjs/operators/_predicates.js +12 -25
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/_internal.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/accumulator.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/first.js +3 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/last.js +4 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/max.js +9 -6
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/mergeObjects.js +5 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/min.js +9 -3
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/push.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/sum.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/add.js +9 -10
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/ceil.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/exp.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/floor.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/ln.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/log.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/log10.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/round.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/sqrt.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/subtract.js +5 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/trunc.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/arrayElemAt.js +2 -3
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/arrayToObject.js +3 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/concatArrays.js +11 -5
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/filter.js +1 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/first.js +8 -8
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/firstN.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/in.js +1 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/indexOfArray.js +5 -10
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/isArray.js +2 -3
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/last.js +8 -8
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/lastN.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/map.js +1 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/maxN.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/minN.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/reduce.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/reverseArray.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/sortArray.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/zip.js +4 -10
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/bitwise/_internal.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/bitwise/bitNot.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/boolean/not.js +3 -5
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/comparison/cmp.js +6 -5
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/conditional/cond.js +1 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/conditional/ifNull.js +1 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/conditional/switch.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/_internal.js +157 -65
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateAdd.js +1 -29
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateDiff.js +32 -20
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateFromParts.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateFromString.js +13 -9
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateToString.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateTrunc.js +107 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dayOfYear.js +1 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/index.js +2 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/isoWeekYear.js +1 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/week.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/misc/getField.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/mergeObjects.js +9 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/objectToArray.js +5 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/setField.js +11 -7
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setDifference.js +9 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setEquals.js +17 -3
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setIntersection.js +2 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setIsSubset.js +15 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setUnion.js +4 -5
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/_internal.js +4 -8
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/concat.js +5 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/indexOfBytes.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/replaceAll.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/replaceOne.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/split.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/strcasecmp.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/substr.js +4 -14
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/substrBytes.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/atan2.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/cosh.js +0 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/_internal.js +20 -10
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/convert.js +3 -5
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toBool.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toDate.js +3 -6
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toDouble.js +5 -10
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toInt.js +1 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toLong.js +1 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toString.js +11 -10
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/type.js +11 -14
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/addFields.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/bucket.js +53 -53
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/bucketAuto.js +670 -65
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/count.js +2 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/densify.js +196 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/graphLookup.js +78 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/group.js +6 -9
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/index.js +4 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/limit.js +1 -3
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/lookup.js +47 -10
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/merge.js +7 -13
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/out.js +1 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/project.js +19 -38
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/redact.js +3 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/replaceWith.js +9 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/sample.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/setWindowFields.js +10 -20
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/skip.js +1 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/sort.js +10 -19
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/sortByCount.js +5 -3
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/unionWith.js +1 -1
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/unset.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/unwind.js +5 -9
- package/rust-client/node_modules/mingo/dist/cjs/operators/projection/elemMatch.js +2 -3
- package/rust-client/node_modules/mingo/dist/cjs/operators/projection/slice.js +2 -3
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/bitwise/_internal.js +4 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/_internal.js +8 -14
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/addToSet.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/bit.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/max.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/min.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/pop.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/pull.js +2 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/push.js +3 -9
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/rename.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/set.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/unset.js +1 -2
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/_internal.js +2 -3
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/denseRank.js +8 -10
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/derivative.js +4 -6
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/documentNumber.js +1 -3
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/expMovingAvg.js +4 -6
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/integral.js +3 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/linearFill.js +4 -6
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/locf.js +3 -4
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/rank.js +8 -10
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/shift.js +2 -2
- package/rust-client/node_modules/mingo/dist/cjs/query.js +20 -19
- package/rust-client/node_modules/mingo/dist/cjs/types.js +22 -0
- package/rust-client/node_modules/mingo/dist/cjs/updater.js +6 -5
- package/rust-client/node_modules/mingo/dist/cjs/util.js +265 -388
- package/rust-client/node_modules/mingo/dist/esm/aggregator.js +18 -21
- package/rust-client/node_modules/mingo/dist/esm/core.js +179 -192
- package/rust-client/node_modules/mingo/dist/esm/cursor.js +35 -35
- package/rust-client/node_modules/mingo/dist/esm/index.js +8 -2
- package/rust-client/node_modules/mingo/dist/esm/init/basic.js +5 -12
- package/rust-client/node_modules/mingo/dist/esm/init/system.js +7 -7
- package/rust-client/node_modules/mingo/dist/esm/lazy.js +58 -61
- package/rust-client/node_modules/mingo/dist/esm/operators/_predicates.js +14 -32
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/_internal.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/accumulator.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/first.js +7 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/last.js +8 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/max.js +10 -7
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/mergeObjects.js +5 -1
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/min.js +10 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/push.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/sum.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/add.js +9 -10
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/ceil.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/exp.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/floor.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/ln.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/log.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/log10.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/round.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/sqrt.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/subtract.js +5 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/trunc.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/arrayElemAt.js +3 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/arrayToObject.js +3 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/concatArrays.js +12 -6
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/filter.js +2 -1
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/first.js +10 -13
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/firstN.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/in.js +1 -1
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/indexOfArray.js +5 -10
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/isArray.js +2 -3
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/last.js +10 -13
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/lastN.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/map.js +2 -1
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/maxN.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/minN.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/reduce.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/reverseArray.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/sortArray.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/zip.js +4 -10
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/bitwise/_internal.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/bitwise/bitNot.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/boolean/not.js +4 -6
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/comparison/cmp.js +6 -5
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/conditional/cond.js +2 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/conditional/ifNull.js +1 -1
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/conditional/switch.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/_internal.js +140 -61
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateAdd.js +2 -35
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateDiff.js +43 -21
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateFromParts.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateFromString.js +13 -11
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateToString.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateTrunc.js +97 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dayOfYear.js +2 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/index.js +1 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/isoWeekYear.js +2 -5
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/week.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/misc/getField.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/mergeObjects.js +10 -3
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/objectToArray.js +6 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/setField.js +11 -7
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setDifference.js +10 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setEquals.js +18 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setIntersection.js +3 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setIsSubset.js +16 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setUnion.js +5 -6
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/_internal.js +4 -8
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/concat.js +6 -3
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/indexOfBytes.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/replaceAll.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/replaceOne.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/split.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/strcasecmp.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/substr.js +4 -14
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/substrBytes.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/atan2.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/cosh.js +0 -1
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/_internal.js +17 -11
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/convert.js +3 -5
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toBool.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toDate.js +4 -7
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toDouble.js +6 -11
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toInt.js +2 -5
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toLong.js +2 -5
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toString.js +12 -11
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/type.js +12 -15
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/addFields.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/bucket.js +54 -61
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/bucketAuto.js +679 -66
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/count.js +3 -3
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/densify.js +183 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/graphLookup.js +55 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/group.js +6 -9
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/index.js +2 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/limit.js +1 -3
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/lookup.js +55 -11
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/merge.js +9 -14
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/out.js +2 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/project.js +21 -42
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/redact.js +3 -1
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/replaceWith.js +9 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/sample.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/setWindowFields.js +12 -23
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/skip.js +1 -1
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/sort.js +11 -20
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/sortByCount.js +5 -3
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/unionWith.js +2 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/unset.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/unwind.js +6 -9
- package/rust-client/node_modules/mingo/dist/esm/operators/projection/elemMatch.js +3 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/projection/slice.js +2 -3
- package/rust-client/node_modules/mingo/dist/esm/operators/query/bitwise/_internal.js +4 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/update/_internal.js +9 -14
- package/rust-client/node_modules/mingo/dist/esm/operators/update/addToSet.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/update/bit.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/update/max.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/update/min.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/update/pop.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/update/pull.js +2 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/update/push.js +3 -9
- package/rust-client/node_modules/mingo/dist/esm/operators/update/rename.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/update/set.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/update/unset.js +1 -2
- package/rust-client/node_modules/mingo/dist/esm/operators/window/_internal.js +2 -3
- package/rust-client/node_modules/mingo/dist/esm/operators/window/denseRank.js +8 -10
- package/rust-client/node_modules/mingo/dist/esm/operators/window/derivative.js +4 -6
- package/rust-client/node_modules/mingo/dist/esm/operators/window/documentNumber.js +1 -3
- package/rust-client/node_modules/mingo/dist/esm/operators/window/expMovingAvg.js +4 -6
- package/rust-client/node_modules/mingo/dist/esm/operators/window/integral.js +3 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/window/linearFill.js +4 -6
- package/rust-client/node_modules/mingo/dist/esm/operators/window/locf.js +3 -4
- package/rust-client/node_modules/mingo/dist/esm/operators/window/rank.js +8 -10
- package/rust-client/node_modules/mingo/dist/esm/operators/window/shift.js +2 -2
- package/rust-client/node_modules/mingo/dist/esm/query.js +22 -32
- package/rust-client/node_modules/mingo/dist/esm/types.js +14 -0
- package/rust-client/node_modules/mingo/dist/esm/updater.js +5 -5
- package/rust-client/node_modules/mingo/dist/esm/util.js +263 -377
- package/rust-client/node_modules/mingo/dist/types/aggregator.d.ts +7 -9
- package/rust-client/node_modules/mingo/dist/types/core.d.ts +41 -52
- package/rust-client/node_modules/mingo/dist/types/cursor.d.ts +6 -12
- package/rust-client/node_modules/mingo/dist/types/index.d.ts +8 -4
- package/rust-client/node_modules/mingo/dist/types/init/basic.d.ts +1 -6
- package/rust-client/node_modules/mingo/dist/types/lazy.d.ts +19 -15
- package/rust-client/node_modules/mingo/dist/types/operators/_predicates.d.ts +20 -20
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/accumulator.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/addToSet.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/avg.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/bottom.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/bottomN.d.ts +4 -4
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/count.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/covariancePop.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/covarianceSamp.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/first.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/firstN.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/last.d.ts +4 -4
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/lastN.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/max.d.ts +4 -5
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/maxN.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/mergeObjects.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/min.d.ts +4 -5
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/minN.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/percentile.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/push.d.ts +4 -4
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/stdDevPop.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/stdDevSamp.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/sum.d.ts +5 -3
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/top.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/topN.d.ts +4 -4
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/add.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/multiply.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/pow.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/subtract.d.ts +1 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/arrayElemAt.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/concatArrays.d.ts +3 -3
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/filter.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/first.d.ts +0 -4
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/firstN.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/in.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/indexOfArray.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/isArray.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/last.d.ts +0 -4
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/lastN.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/map.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/maxN.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/minN.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/range.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/reduce.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/reverseArray.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/slice.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/_internal.d.ts +31 -9
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateFromString.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateToParts.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateTrunc.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/index.d.ts +1 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/misc/rand.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/expression/object/mergeObjects.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/expression/percentile.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/set/setIsSubset.d.ts +3 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/_internal.d.ts +4 -4
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/indexOfBytes.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/replaceAll.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/replaceOne.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/split.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/strLenBytes.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/strLenCP.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/substrBytes.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/_internal.d.ts +6 -2
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/_internal.d.ts +4 -4
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/addFields.d.ts +8 -5
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/bucket.d.ts +8 -5
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/bucketAuto.d.ts +8 -7
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/count.d.ts +7 -5
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/densify.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/facet.d.ts +7 -1
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/fill.d.ts +6 -3
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/graphLookup.d.ts +13 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/group.d.ts +4 -2
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/index.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/limit.d.ts +3 -1
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/lookup.d.ts +4 -2
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/match.d.ts +4 -3
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/merge.d.ts +3 -5
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/out.d.ts +5 -3
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/project.d.ts +4 -3
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/redact.d.ts +1 -1
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/replaceRoot.d.ts +5 -5
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/replaceWith.d.ts +8 -1
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/sample.d.ts +7 -5
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/setWindowFields.d.ts +7 -5
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/skip.d.ts +6 -4
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/sort.d.ts +5 -3
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/sortByCount.d.ts +5 -5
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/unionWith.d.ts +3 -1
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/unset.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/unwind.d.ts +5 -2
- package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/expr.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/jsonSchema.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/where.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/_internal.d.ts +5 -5
- package/rust-client/node_modules/mingo/dist/types/operators/update/addToSet.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/bit.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/currentDate.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/inc.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/max.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/min.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/mul.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/pop.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/pull.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/pullAll.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/push.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/rename.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/set.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/update/unset.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/window/_internal.d.ts +5 -5
- package/rust-client/node_modules/mingo/dist/types/operators/window/denseRank.d.ts +2 -3
- package/rust-client/node_modules/mingo/dist/types/operators/window/derivative.d.ts +2 -3
- package/rust-client/node_modules/mingo/dist/types/operators/window/documentNumber.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/window/expMovingAvg.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/window/integral.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/window/linearFill.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/window/locf.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/window/rank.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/operators/window/shift.d.ts +2 -2
- package/rust-client/node_modules/mingo/dist/types/query.d.ts +5 -7
- package/rust-client/node_modules/mingo/dist/types/types.d.ts +18 -15
- package/rust-client/node_modules/mingo/dist/types/updater.d.ts +9 -10
- package/rust-client/node_modules/mingo/dist/types/util.d.ts +102 -90
- package/rust-client/node_modules/mingo/package.json +1 -1
|
@@ -37,12 +37,13 @@ var ProcessingMode = /* @__PURE__ */ ((ProcessingMode2) => {
|
|
|
37
37
|
return ProcessingMode2;
|
|
38
38
|
})(ProcessingMode || {});
|
|
39
39
|
class ComputeOptions {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
this
|
|
40
|
+
#options;
|
|
41
|
+
/** Reference to the root object when processing subgraphs of the object. */
|
|
42
|
+
#root;
|
|
43
|
+
#local;
|
|
44
|
+
constructor(options, root, local) {
|
|
45
|
+
this.#options = options;
|
|
46
|
+
this.update(root, local);
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
49
|
* Initialize new ComputeOptions.
|
|
@@ -53,64 +54,82 @@ class ComputeOptions {
|
|
|
53
54
|
* @returns {ComputeOptions}
|
|
54
55
|
*/
|
|
55
56
|
static init(options, root, local) {
|
|
56
|
-
return options instanceof ComputeOptions ? new ComputeOptions(
|
|
57
|
-
options
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
return options instanceof ComputeOptions ? new ComputeOptions(options.#options, options.root ?? root, {
|
|
58
|
+
...options.#local,
|
|
59
|
+
...local,
|
|
60
|
+
// retain existing variables
|
|
61
|
+
variables: Object.assign(
|
|
62
|
+
{},
|
|
63
|
+
options.#local?.variables,
|
|
64
|
+
local?.variables
|
|
65
|
+
)
|
|
66
|
+
}) : new ComputeOptions(options, root, local);
|
|
61
67
|
}
|
|
62
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Updates the internal state.
|
|
70
|
+
*
|
|
71
|
+
* @param root The new root context for this object.
|
|
72
|
+
* @param local The new local state to merge into current if it exists.
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
63
75
|
update(root, local) {
|
|
64
|
-
this
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
this.#root = root;
|
|
77
|
+
const variables = Object.assign(
|
|
78
|
+
{},
|
|
79
|
+
this.#local?.variables,
|
|
80
|
+
local?.variables
|
|
81
|
+
);
|
|
82
|
+
if (Object.keys(variables).length) {
|
|
83
|
+
this.#local = { ...local, variables };
|
|
84
|
+
} else {
|
|
85
|
+
this.#local = local ?? {};
|
|
86
|
+
}
|
|
68
87
|
return this;
|
|
69
88
|
}
|
|
70
89
|
getOptions() {
|
|
71
90
|
return Object.freeze({
|
|
72
|
-
...this
|
|
73
|
-
context: Context.from(this.
|
|
91
|
+
...this.#options,
|
|
92
|
+
context: Context.from(this.#options.context)
|
|
74
93
|
});
|
|
75
94
|
}
|
|
76
95
|
get root() {
|
|
77
|
-
return this
|
|
96
|
+
return this.#root;
|
|
78
97
|
}
|
|
79
98
|
get local() {
|
|
80
|
-
return this
|
|
99
|
+
return this.#local;
|
|
81
100
|
}
|
|
82
101
|
get idKey() {
|
|
83
|
-
return this.
|
|
102
|
+
return this.#options.idKey;
|
|
84
103
|
}
|
|
85
104
|
get collation() {
|
|
86
|
-
return this
|
|
105
|
+
return this.#options?.collation;
|
|
87
106
|
}
|
|
88
107
|
get processingMode() {
|
|
89
|
-
return this
|
|
108
|
+
return this.#options?.processingMode || "CLONE_OFF" /* CLONE_OFF */;
|
|
90
109
|
}
|
|
91
110
|
get useStrictMode() {
|
|
92
|
-
return this
|
|
111
|
+
return this.#options?.useStrictMode;
|
|
93
112
|
}
|
|
94
113
|
get scriptEnabled() {
|
|
95
|
-
return this
|
|
114
|
+
return this.#options?.scriptEnabled;
|
|
96
115
|
}
|
|
97
116
|
get useGlobalContext() {
|
|
98
|
-
return this
|
|
117
|
+
return this.#options?.useGlobalContext;
|
|
99
118
|
}
|
|
100
119
|
get hashFunction() {
|
|
101
|
-
return this
|
|
120
|
+
return this.#options?.hashFunction;
|
|
102
121
|
}
|
|
103
122
|
get collectionResolver() {
|
|
104
|
-
return this
|
|
123
|
+
return this.#options?.collectionResolver;
|
|
105
124
|
}
|
|
106
125
|
get jsonSchemaValidator() {
|
|
107
|
-
return this
|
|
126
|
+
return this.#options?.jsonSchemaValidator;
|
|
108
127
|
}
|
|
109
128
|
get variables() {
|
|
110
|
-
return this
|
|
129
|
+
return this.#options?.variables;
|
|
111
130
|
}
|
|
112
131
|
get context() {
|
|
113
|
-
return this
|
|
132
|
+
return this.#options?.context;
|
|
114
133
|
}
|
|
115
134
|
}
|
|
116
135
|
function initOptions(options) {
|
|
@@ -121,7 +140,7 @@ function initOptions(options) {
|
|
|
121
140
|
useGlobalContext: true,
|
|
122
141
|
processingMode: "CLONE_OFF" /* CLONE_OFF */,
|
|
123
142
|
...options,
|
|
124
|
-
context: options?.context ? Context.from(options?.context) : Context.init(
|
|
143
|
+
context: options?.context ? Context.from(options?.context) : Context.init()
|
|
125
144
|
});
|
|
126
145
|
}
|
|
127
146
|
var OperatorType = /* @__PURE__ */ ((OperatorType2) => {
|
|
@@ -134,55 +153,48 @@ var OperatorType = /* @__PURE__ */ ((OperatorType2) => {
|
|
|
134
153
|
return OperatorType2;
|
|
135
154
|
})(OperatorType || {});
|
|
136
155
|
class Context {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
["accumulator" /* ACCUMULATOR */]: {},
|
|
140
|
-
["expression" /* EXPRESSION */]: {},
|
|
141
|
-
["pipeline" /* PIPELINE */]: {},
|
|
142
|
-
["projection" /* PROJECTION */]: {},
|
|
143
|
-
["query" /* QUERY */]: {},
|
|
144
|
-
["window" /* WINDOW */]: {}
|
|
145
|
-
};
|
|
146
|
-
for (const [type, operators] of Object.entries(ops)) {
|
|
147
|
-
this.addOperators(type, operators);
|
|
148
|
-
}
|
|
156
|
+
#operators = /* @__PURE__ */ new Map();
|
|
157
|
+
constructor() {
|
|
149
158
|
}
|
|
150
|
-
static init(
|
|
151
|
-
return new Context(
|
|
159
|
+
static init() {
|
|
160
|
+
return new Context();
|
|
152
161
|
}
|
|
153
162
|
static from(ctx) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
163
|
+
const instance = Context.init();
|
|
164
|
+
if ((0, import_util.isNil)(ctx)) return instance;
|
|
165
|
+
ctx.#operators.forEach((v, k) => instance.addOperators(k, v));
|
|
166
|
+
return instance;
|
|
167
|
+
}
|
|
168
|
+
addOperators(type, operators) {
|
|
169
|
+
if (!this.#operators.has(type)) this.#operators.set(type, {});
|
|
170
|
+
for (const [name, fn] of Object.entries(operators)) {
|
|
158
171
|
if (!this.getOperator(type, name)) {
|
|
159
|
-
this.
|
|
172
|
+
this.#operators.get(type)[name] = fn;
|
|
160
173
|
}
|
|
161
174
|
}
|
|
162
175
|
return this;
|
|
163
176
|
}
|
|
164
|
-
|
|
177
|
+
getOperator(type, name) {
|
|
178
|
+
const ops = this.#operators.get(type) ?? {};
|
|
179
|
+
return ops[name] ?? null;
|
|
180
|
+
}
|
|
165
181
|
addAccumulatorOps(ops) {
|
|
166
|
-
return this.addOperators("accumulator"
|
|
182
|
+
return this.addOperators("accumulator", ops);
|
|
167
183
|
}
|
|
168
184
|
addExpressionOps(ops) {
|
|
169
|
-
return this.addOperators("expression"
|
|
185
|
+
return this.addOperators("expression", ops);
|
|
170
186
|
}
|
|
171
187
|
addQueryOps(ops) {
|
|
172
|
-
return this.addOperators("query"
|
|
188
|
+
return this.addOperators("query", ops);
|
|
173
189
|
}
|
|
174
190
|
addPipelineOps(ops) {
|
|
175
|
-
return this.addOperators("pipeline"
|
|
191
|
+
return this.addOperators("pipeline", ops);
|
|
176
192
|
}
|
|
177
193
|
addProjectionOps(ops) {
|
|
178
|
-
return this.addOperators("projection"
|
|
194
|
+
return this.addOperators("projection", ops);
|
|
179
195
|
}
|
|
180
196
|
addWindowOps(ops) {
|
|
181
|
-
return this.addOperators("window"
|
|
182
|
-
}
|
|
183
|
-
// getters
|
|
184
|
-
getOperator(type, name) {
|
|
185
|
-
return type in this.operators ? this.operators[type][name] || null : null;
|
|
197
|
+
return this.addOperators("window", ops);
|
|
186
198
|
}
|
|
187
199
|
}
|
|
188
200
|
const GLOBAL_CONTEXT = Context.init();
|
|
@@ -199,176 +211,153 @@ function useOperators(type, operators) {
|
|
|
199
211
|
);
|
|
200
212
|
}
|
|
201
213
|
switch (type) {
|
|
202
|
-
case "accumulator"
|
|
214
|
+
case "accumulator":
|
|
203
215
|
GLOBAL_CONTEXT.addAccumulatorOps(operators);
|
|
204
216
|
break;
|
|
205
|
-
case "expression"
|
|
217
|
+
case "expression":
|
|
206
218
|
GLOBAL_CONTEXT.addExpressionOps(operators);
|
|
207
219
|
break;
|
|
208
|
-
case "pipeline"
|
|
220
|
+
case "pipeline":
|
|
209
221
|
GLOBAL_CONTEXT.addPipelineOps(operators);
|
|
210
222
|
break;
|
|
211
|
-
case "projection"
|
|
223
|
+
case "projection":
|
|
212
224
|
GLOBAL_CONTEXT.addProjectionOps(operators);
|
|
213
225
|
break;
|
|
214
|
-
case "query"
|
|
226
|
+
case "query":
|
|
215
227
|
GLOBAL_CONTEXT.addQueryOps(operators);
|
|
216
228
|
break;
|
|
217
|
-
case "window"
|
|
229
|
+
case "window":
|
|
218
230
|
GLOBAL_CONTEXT.addWindowOps(operators);
|
|
219
231
|
break;
|
|
220
232
|
}
|
|
221
233
|
}
|
|
222
|
-
function getOperator(type,
|
|
234
|
+
function getOperator(type, name, options) {
|
|
223
235
|
const { context: ctx, useGlobalContext: fallback } = options || {};
|
|
224
|
-
const fn = ctx ? ctx.getOperator(type,
|
|
225
|
-
return !fn && fallback ? GLOBAL_CONTEXT.getOperator(type,
|
|
236
|
+
const fn = ctx ? ctx.getOperator(type, name) : null;
|
|
237
|
+
return !fn && fallback ? GLOBAL_CONTEXT.getOperator(type, name) : fn;
|
|
226
238
|
}
|
|
227
|
-
const systemVariables = {
|
|
228
|
-
$$ROOT(_obj, _expr, options) {
|
|
229
|
-
return options.root;
|
|
230
|
-
},
|
|
231
|
-
$$CURRENT(obj, _expr, _options) {
|
|
232
|
-
return obj;
|
|
233
|
-
},
|
|
234
|
-
$$REMOVE(_obj, _expr, _options) {
|
|
235
|
-
return void 0;
|
|
236
|
-
},
|
|
237
|
-
$$NOW(_obj, _expr, options) {
|
|
238
|
-
return new Date(options.timestamp);
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
const redactVariables = {
|
|
242
|
-
$$KEEP(obj, _expr, _options) {
|
|
243
|
-
return obj;
|
|
244
|
-
},
|
|
245
|
-
$$PRUNE(_obj, _expr, _options) {
|
|
246
|
-
return void 0;
|
|
247
|
-
},
|
|
248
|
-
$$DESCEND(obj, expr, options) {
|
|
249
|
-
if (!(0, import_util.has)(expr, "$cond"))
|
|
250
|
-
return obj;
|
|
251
|
-
let result;
|
|
252
|
-
for (const [key, current] of Object.entries(obj)) {
|
|
253
|
-
if ((0, import_util.isObjectLike)(current)) {
|
|
254
|
-
if (current instanceof Array) {
|
|
255
|
-
const array = [];
|
|
256
|
-
for (let elem of current) {
|
|
257
|
-
if ((0, import_util.isObject)(elem)) {
|
|
258
|
-
elem = redact(elem, expr, options.update(elem));
|
|
259
|
-
}
|
|
260
|
-
if (!(0, import_util.isNil)(elem)) {
|
|
261
|
-
array.push(elem);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
result = array;
|
|
265
|
-
} else {
|
|
266
|
-
result = redact(
|
|
267
|
-
current,
|
|
268
|
-
expr,
|
|
269
|
-
options.update(current)
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
if ((0, import_util.isNil)(result)) {
|
|
273
|
-
delete obj[key];
|
|
274
|
-
} else {
|
|
275
|
-
obj[key] = result;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
return obj;
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
239
|
function computeValue(obj, expr, operator, options) {
|
|
283
240
|
const copts = ComputeOptions.init(options, obj);
|
|
284
|
-
operator
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
operator,
|
|
289
|
-
options
|
|
290
|
-
);
|
|
291
|
-
if (callExpression)
|
|
292
|
-
return callExpression(obj, expr, copts);
|
|
293
|
-
const callAccumulator = getOperator(
|
|
294
|
-
"accumulator" /* ACCUMULATOR */,
|
|
295
|
-
operator,
|
|
296
|
-
options
|
|
297
|
-
);
|
|
298
|
-
if (callAccumulator) {
|
|
299
|
-
if (!(obj instanceof Array)) {
|
|
300
|
-
obj = computeValue(obj, expr, null, copts);
|
|
301
|
-
expr = null;
|
|
302
|
-
}
|
|
303
|
-
(0, import_util.assert)(obj instanceof Array, `'${operator}' target must be an array.`);
|
|
304
|
-
return callAccumulator(
|
|
305
|
-
obj,
|
|
306
|
-
expr,
|
|
307
|
-
// reset the root object for accumulators.
|
|
308
|
-
copts.update(null, copts.local)
|
|
309
|
-
);
|
|
310
|
-
}
|
|
311
|
-
throw new import_util.MingoError(`operator '${operator}' is not registered`);
|
|
312
|
-
}
|
|
241
|
+
return !!operator && (0, import_util.isOperator)(operator) ? computeOperator(obj, expr, operator, copts) : computeExpression(obj, expr, copts);
|
|
242
|
+
}
|
|
243
|
+
const SYSTEM_VARS = ["$$ROOT", "$$CURRENT", "$$REMOVE", "$$NOW"];
|
|
244
|
+
function computeExpression(obj, expr, options) {
|
|
313
245
|
if ((0, import_util.isString)(expr) && expr.length > 0 && expr[0] === "$") {
|
|
314
|
-
if (
|
|
315
|
-
|
|
316
|
-
}
|
|
317
|
-
let context = copts.root;
|
|
246
|
+
if (REDACT_ACTIONS.includes(expr)) return expr;
|
|
247
|
+
let ctx = options.root;
|
|
318
248
|
const arr = expr.split(".");
|
|
319
|
-
if (
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
249
|
+
if (SYSTEM_VARS.includes(arr[0])) {
|
|
250
|
+
switch (arr[0]) {
|
|
251
|
+
case "$$ROOT":
|
|
252
|
+
break;
|
|
253
|
+
case "$$CURRENT":
|
|
254
|
+
ctx = obj;
|
|
255
|
+
break;
|
|
256
|
+
case "$$REMOVE":
|
|
257
|
+
ctx = void 0;
|
|
258
|
+
break;
|
|
259
|
+
case "$$NOW":
|
|
260
|
+
ctx = /* @__PURE__ */ new Date();
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
325
263
|
expr = expr.slice(arr[0].length + 1);
|
|
326
264
|
} else if (arr[0].slice(0, 2) === "$$") {
|
|
327
|
-
|
|
265
|
+
ctx = Object.assign(
|
|
328
266
|
{},
|
|
329
|
-
copts.variables,
|
|
330
267
|
// global vars
|
|
268
|
+
options.variables,
|
|
331
269
|
// current item is added before local variables because the binding may be changed.
|
|
332
270
|
{ this: obj },
|
|
333
|
-
copts.local?.variables
|
|
334
271
|
// local vars
|
|
272
|
+
options?.local?.variables
|
|
335
273
|
);
|
|
336
|
-
const
|
|
337
|
-
(0, import_util.assert)(
|
|
338
|
-
(0, import_util.has)(context, prefix),
|
|
339
|
-
`Use of undefined variable: ${prefix}`
|
|
340
|
-
);
|
|
274
|
+
const name = arr[0].slice(2);
|
|
275
|
+
(0, import_util.assert)((0, import_util.has)(ctx, name), `Use of undefined variable: ${name}`);
|
|
341
276
|
expr = expr.slice(2);
|
|
342
277
|
} else {
|
|
343
278
|
expr = expr.slice(1);
|
|
344
279
|
}
|
|
345
|
-
|
|
346
|
-
return context;
|
|
347
|
-
return (0, import_util.resolve)(context, expr);
|
|
280
|
+
return expr === "" ? ctx : (0, import_util.resolve)(ctx, expr);
|
|
348
281
|
}
|
|
349
282
|
if ((0, import_util.isArray)(expr)) {
|
|
350
|
-
return expr.map((item) =>
|
|
351
|
-
}
|
|
283
|
+
return expr.map((item) => computeExpression(obj, item, options));
|
|
284
|
+
}
|
|
285
|
+
if ((0, import_util.isObject)(expr)) {
|
|
352
286
|
const result = {};
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
if (
|
|
356
|
-
(
|
|
357
|
-
|
|
358
|
-
(0, import_util.assert)(
|
|
359
|
-
Object.keys(expr).length === 1,
|
|
360
|
-
"Invalid aggregation expression '" + JSON.stringify(expr) + "'"
|
|
361
|
-
);
|
|
362
|
-
return result[key];
|
|
287
|
+
const elems = Object.entries(expr);
|
|
288
|
+
for (const [key, val] of elems) {
|
|
289
|
+
if ((0, import_util.isOperator)(key)) {
|
|
290
|
+
(0, import_util.assert)(elems.length == 1, "expression must have single operator.");
|
|
291
|
+
return computeOperator(obj, val, key, options);
|
|
363
292
|
}
|
|
293
|
+
result[key] = computeExpression(obj, val, options);
|
|
364
294
|
}
|
|
365
295
|
return result;
|
|
366
296
|
}
|
|
367
297
|
return expr;
|
|
368
298
|
}
|
|
299
|
+
function computeOperator(obj, expr, operator, options) {
|
|
300
|
+
const callExpression = getOperator(
|
|
301
|
+
"expression",
|
|
302
|
+
operator,
|
|
303
|
+
options
|
|
304
|
+
);
|
|
305
|
+
if (callExpression) return callExpression(obj, expr, options);
|
|
306
|
+
const callAccumulator = getOperator(
|
|
307
|
+
"accumulator",
|
|
308
|
+
operator,
|
|
309
|
+
options
|
|
310
|
+
);
|
|
311
|
+
(0, import_util.assert)(!!callAccumulator, `accumulator '${operator}' is not registered.`);
|
|
312
|
+
if (!(0, import_util.isArray)(obj)) {
|
|
313
|
+
obj = computeExpression(obj, expr, options);
|
|
314
|
+
expr = null;
|
|
315
|
+
}
|
|
316
|
+
(0, import_util.assert)((0, import_util.isArray)(obj), `arguments must resolve to array for ${operator}.`);
|
|
317
|
+
return callAccumulator(
|
|
318
|
+
obj,
|
|
319
|
+
expr,
|
|
320
|
+
options.update(null, options.local)
|
|
321
|
+
// reset the root object.
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
const REDACT_ACTIONS = ["$$KEEP", "$$PRUNE", "$$DESCEND"];
|
|
369
325
|
function redact(obj, expr, options) {
|
|
370
|
-
const
|
|
371
|
-
|
|
326
|
+
const action = computeValue(obj, expr, null, options);
|
|
327
|
+
switch (action) {
|
|
328
|
+
case "$$KEEP":
|
|
329
|
+
return obj;
|
|
330
|
+
case "$$PRUNE":
|
|
331
|
+
return void 0;
|
|
332
|
+
case "$$DESCEND": {
|
|
333
|
+
if (!(0, import_util.has)(expr, "$cond")) return obj;
|
|
334
|
+
const output = {};
|
|
335
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
336
|
+
if ((0, import_util.isArray)(value)) {
|
|
337
|
+
const res = new Array();
|
|
338
|
+
for (let elem of value) {
|
|
339
|
+
if ((0, import_util.isObject)(elem)) {
|
|
340
|
+
elem = redact(elem, expr, options.update(elem));
|
|
341
|
+
}
|
|
342
|
+
if (!(0, import_util.isNil)(elem)) res.push(elem);
|
|
343
|
+
}
|
|
344
|
+
output[key] = res;
|
|
345
|
+
} else if ((0, import_util.isObject)(value)) {
|
|
346
|
+
const res = redact(
|
|
347
|
+
value,
|
|
348
|
+
expr,
|
|
349
|
+
options.update(value)
|
|
350
|
+
);
|
|
351
|
+
if (!(0, import_util.isNil)(res)) output[key] = res;
|
|
352
|
+
} else {
|
|
353
|
+
output[key] = value;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return output;
|
|
357
|
+
}
|
|
358
|
+
default:
|
|
359
|
+
return action;
|
|
360
|
+
}
|
|
372
361
|
}
|
|
373
362
|
// Annotate the CommonJS export names for ESM import in node:
|
|
374
363
|
0 && (module.exports = {
|
|
@@ -24,35 +24,38 @@ var import_aggregator = require("./aggregator");
|
|
|
24
24
|
var import_lazy = require("./lazy");
|
|
25
25
|
var import_util = require("./util");
|
|
26
26
|
class Cursor {
|
|
27
|
+
#source;
|
|
28
|
+
#predicate;
|
|
29
|
+
#projection;
|
|
30
|
+
#options;
|
|
31
|
+
#operators = [];
|
|
32
|
+
#result = null;
|
|
33
|
+
#buffer = [];
|
|
27
34
|
constructor(source, predicate, projection, options) {
|
|
28
|
-
this
|
|
29
|
-
this
|
|
30
|
-
this
|
|
31
|
-
this
|
|
32
|
-
this.operators = [];
|
|
33
|
-
this.result = null;
|
|
34
|
-
this.buffer = [];
|
|
35
|
+
this.#source = source;
|
|
36
|
+
this.#predicate = predicate;
|
|
37
|
+
this.#projection = projection;
|
|
38
|
+
this.#options = options;
|
|
35
39
|
}
|
|
36
40
|
/** Returns the iterator from running the query */
|
|
37
41
|
fetch() {
|
|
38
|
-
if (this
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.operators.push({ $project: this.projection });
|
|
42
|
+
if (this.#result) return this.#result;
|
|
43
|
+
if ((0, import_util.isObject)(this.#projection)) {
|
|
44
|
+
this.#operators.push({ $project: this.#projection });
|
|
42
45
|
}
|
|
43
|
-
this
|
|
44
|
-
if (this
|
|
45
|
-
this
|
|
46
|
-
this
|
|
46
|
+
this.#result = (0, import_lazy.Lazy)(this.#source).filter(this.#predicate);
|
|
47
|
+
if (this.#operators.length > 0) {
|
|
48
|
+
this.#result = new import_aggregator.Aggregator(this.#operators, this.#options).stream(
|
|
49
|
+
this.#result
|
|
47
50
|
);
|
|
48
51
|
}
|
|
49
|
-
return this
|
|
52
|
+
return this.#result;
|
|
50
53
|
}
|
|
51
54
|
/** Returns an iterator with the buffered data included */
|
|
52
55
|
fetchAll() {
|
|
53
|
-
const buffered = (0, import_lazy.Lazy)([...this
|
|
54
|
-
this
|
|
55
|
-
return (0, import_lazy.
|
|
56
|
+
const buffered = (0, import_lazy.Lazy)([...this.#buffer]);
|
|
57
|
+
this.#buffer = [];
|
|
58
|
+
return (0, import_lazy.concat)(buffered, this.fetch());
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
58
61
|
* Return remaining objects in the cursor as an array. This method exhausts the cursor
|
|
@@ -74,7 +77,7 @@ class Cursor {
|
|
|
74
77
|
* @return {Cursor} Returns the cursor, so you can chain this call.
|
|
75
78
|
*/
|
|
76
79
|
skip(n) {
|
|
77
|
-
this
|
|
80
|
+
this.#operators.push({ $skip: n });
|
|
78
81
|
return this;
|
|
79
82
|
}
|
|
80
83
|
/**
|
|
@@ -83,16 +86,16 @@ class Cursor {
|
|
|
83
86
|
* @return {Cursor} Returns the cursor, so you can chain this call.
|
|
84
87
|
*/
|
|
85
88
|
limit(n) {
|
|
86
|
-
this
|
|
89
|
+
this.#operators.push({ $limit: n });
|
|
87
90
|
return this;
|
|
88
91
|
}
|
|
89
92
|
/**
|
|
90
93
|
* Returns results ordered according to a sort specification.
|
|
91
|
-
* @param {
|
|
94
|
+
* @param {AnyObject} modifier an object of key and values specifying the sort order. 1 for ascending and -1 for descending
|
|
92
95
|
* @return {Cursor} Returns the cursor, so you can chain this call.
|
|
93
96
|
*/
|
|
94
97
|
sort(modifier) {
|
|
95
|
-
this
|
|
98
|
+
this.#operators.push({ $sort: modifier });
|
|
96
99
|
return this;
|
|
97
100
|
}
|
|
98
101
|
/**
|
|
@@ -100,20 +103,19 @@ class Cursor {
|
|
|
100
103
|
* @param {*} spec
|
|
101
104
|
*/
|
|
102
105
|
collation(spec) {
|
|
103
|
-
this
|
|
106
|
+
this.#options = { ...this.#options, collation: spec };
|
|
104
107
|
return this;
|
|
105
108
|
}
|
|
106
109
|
/**
|
|
107
110
|
* Returns the next document in a cursor.
|
|
108
|
-
* @returns {
|
|
111
|
+
* @returns {AnyObject | Boolean}
|
|
109
112
|
*/
|
|
110
113
|
next() {
|
|
111
|
-
if (this
|
|
112
|
-
return this
|
|
114
|
+
if (this.#buffer.length > 0) {
|
|
115
|
+
return this.#buffer.pop();
|
|
113
116
|
}
|
|
114
117
|
const o = this.fetch().next();
|
|
115
|
-
if (o.done)
|
|
116
|
-
return;
|
|
118
|
+
if (o.done) return;
|
|
117
119
|
return o.value;
|
|
118
120
|
}
|
|
119
121
|
/**
|
|
@@ -121,12 +123,10 @@ class Cursor {
|
|
|
121
123
|
* @returns {boolean}
|
|
122
124
|
*/
|
|
123
125
|
hasNext() {
|
|
124
|
-
if (this
|
|
125
|
-
return true;
|
|
126
|
+
if (this.#buffer.length > 0) return true;
|
|
126
127
|
const o = this.fetch().next();
|
|
127
|
-
if (o.done)
|
|
128
|
-
|
|
129
|
-
this.buffer.push(o.value);
|
|
128
|
+
if (o.done) return false;
|
|
129
|
+
this.#buffer.push(o.value);
|
|
130
130
|
return true;
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
@@ -20,16 +20,20 @@ __export(src_exports, {
|
|
|
20
20
|
Aggregator: () => import_aggregator2.Aggregator,
|
|
21
21
|
Query: () => import_query2.Query,
|
|
22
22
|
aggregate: () => aggregate,
|
|
23
|
+
createUpdater: () => import_updater2.createUpdater,
|
|
23
24
|
default: () => src_default,
|
|
24
25
|
find: () => find,
|
|
25
|
-
remove: () => remove
|
|
26
|
+
remove: () => remove,
|
|
27
|
+
update: () => import_updater2.update
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(src_exports);
|
|
28
30
|
var import_basic = require("./init/basic");
|
|
29
31
|
var import_aggregator = require("./aggregator");
|
|
30
32
|
var import_query = require("./query");
|
|
33
|
+
var import_updater = require("./updater");
|
|
31
34
|
var import_aggregator2 = require("./aggregator");
|
|
32
35
|
var import_query2 = require("./query");
|
|
36
|
+
var import_updater2 = require("./updater");
|
|
33
37
|
function find(collection, criteria, projection, options) {
|
|
34
38
|
return new import_query.Query(criteria, options).find(collection, projection);
|
|
35
39
|
}
|
|
@@ -43,14 +47,18 @@ var src_default = {
|
|
|
43
47
|
Aggregator: import_aggregator.Aggregator,
|
|
44
48
|
Query: import_query.Query,
|
|
45
49
|
aggregate,
|
|
50
|
+
createUpdater: import_updater.createUpdater,
|
|
46
51
|
find,
|
|
47
|
-
remove
|
|
52
|
+
remove,
|
|
53
|
+
update: import_updater.update
|
|
48
54
|
};
|
|
49
55
|
// Annotate the CommonJS export names for ESM import in node:
|
|
50
56
|
0 && (module.exports = {
|
|
51
57
|
Aggregator,
|
|
52
58
|
Query,
|
|
53
59
|
aggregate,
|
|
60
|
+
createUpdater,
|
|
54
61
|
find,
|
|
55
|
-
remove
|
|
62
|
+
remove,
|
|
63
|
+
update
|
|
56
64
|
});
|