@valkey/valkey-glide-darwin-arm64 1.2.0 → 1.2.1-rc1
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
|
Binary file
|
|
@@ -12,7 +12,8 @@ export const enum Level {
|
|
|
12
12
|
Off = 5,
|
|
13
13
|
}
|
|
14
14
|
export const MAX_REQUEST_ARGS_LEN: number
|
|
15
|
-
export const
|
|
15
|
+
export const DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS: number
|
|
16
|
+
export const DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS: number
|
|
16
17
|
export const DEFAULT_INFLIGHT_REQUESTS_LIMIT: number
|
|
17
18
|
export declare function StartSocketConnection(): Promise<string>
|
|
18
19
|
export declare function log(logLevel: Level, logIdentifier: string, message: string): void
|
|
@@ -287,7 +287,8 @@ if (!nativeBinding) {
|
|
|
287
287
|
const {
|
|
288
288
|
Level,
|
|
289
289
|
MAX_REQUEST_ARGS_LEN,
|
|
290
|
-
|
|
290
|
+
DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS,
|
|
291
|
+
DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS,
|
|
291
292
|
DEFAULT_INFLIGHT_REQUESTS_LIMIT,
|
|
292
293
|
AsyncClient,
|
|
293
294
|
StartSocketConnection,
|
|
@@ -302,7 +303,8 @@ const {
|
|
|
302
303
|
|
|
303
304
|
module.exports.Level = Level
|
|
304
305
|
module.exports.MAX_REQUEST_ARGS_LEN = MAX_REQUEST_ARGS_LEN
|
|
305
|
-
module.exports.
|
|
306
|
+
module.exports.DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS = DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS
|
|
307
|
+
module.exports.DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS = DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS
|
|
306
308
|
module.exports.DEFAULT_INFLIGHT_REQUESTS_LIMIT = DEFAULT_INFLIGHT_REQUESTS_LIMIT
|
|
307
309
|
module.exports.AsyncClient = AsyncClient
|
|
308
310
|
module.exports.StartSocketConnection = StartSocketConnection
|
package/npm/glide/index.ts
CHANGED
|
@@ -53,9 +53,6 @@ function loadNativeBinding() {
|
|
|
53
53
|
break;
|
|
54
54
|
case "darwin":
|
|
55
55
|
switch (arch) {
|
|
56
|
-
case "x64":
|
|
57
|
-
nativeBinding = require("@scope/valkey-glide-darwin-x64");
|
|
58
|
-
break;
|
|
59
56
|
case "arm64":
|
|
60
57
|
nativeBinding = require("@scope/valkey-glide-darwin-arm64");
|
|
61
58
|
break;
|
|
@@ -216,6 +213,8 @@ function initialize() {
|
|
|
216
213
|
Script,
|
|
217
214
|
ObjectType,
|
|
218
215
|
ClusterScanCursor,
|
|
216
|
+
AdvancedGlideClientConfiguration,
|
|
217
|
+
AdvancedGlideClusterClientConfiguration,
|
|
219
218
|
BaseClientConfiguration,
|
|
220
219
|
GlideClusterClientConfiguration,
|
|
221
220
|
LevelOptions,
|
|
@@ -293,6 +292,8 @@ function initialize() {
|
|
|
293
292
|
GlideClient,
|
|
294
293
|
GlideClusterClient,
|
|
295
294
|
GlideClientConfiguration,
|
|
295
|
+
AdvancedGlideClientConfiguration,
|
|
296
|
+
AdvancedGlideClusterClientConfiguration,
|
|
296
297
|
FunctionListOptions,
|
|
297
298
|
FunctionListResponse,
|
|
298
299
|
FunctionStatsSingleResponse,
|
package/npm/glide/package.json
CHANGED
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
43
|
"${scope}valkey-glide-darwin-arm64": "${package_version}",
|
|
44
|
-
"${scope}valkey-glide-darwin-x64": "${package_version}",
|
|
45
44
|
"${scope}valkey-glide-linux-arm64": "${package_version}",
|
|
46
45
|
"${scope}valkey-glide-linux-x64": "${package_version}",
|
|
47
46
|
"${scope}valkey-glide-linux-musl-arm64": "${package_version}",
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"test": "npm run build-test-utils && jest --verbose --testPathIgnorePatterns='ServerModules'",
|
|
35
35
|
"test-dbg": "npm run build-test-utils && jest --runInBand",
|
|
36
36
|
"test-minimum": "npm run build-test-utils && jest --verbose --testNamePattern='^(.(?!(GlideJson|GlideFt|pubsub|kill)))*$'",
|
|
37
|
-
"test-modules": "npm run build-test-utils && jest --verbose --testNamePattern='(GlideJson|GlideFt)'",
|
|
37
|
+
"test-modules": "npm run build-test-utils && jest --runInBand --verbose --testNamePattern='(GlideJson|GlideFt)'",
|
|
38
38
|
"build-test-utils": "cd ../utils && npm i && npm run build",
|
|
39
39
|
"lint:fix": "npm run install-linting && npx eslint -c ../eslint.config.mjs --fix && npm run prettier:format",
|
|
40
40
|
"lint": "npm run install-linting && npx eslint -c ../eslint.config.mjs && npm run prettier:check:ci",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"darwin"
|
|
93
93
|
],
|
|
94
94
|
"name": "@valkey/valkey-glide-darwin-arm64",
|
|
95
|
-
"version": "1.2.
|
|
95
|
+
"version": "1.2.1-rc1"
|
|
96
96
|
}
|
|
@@ -29,7 +29,7 @@ MongoDB query language for in-memory objects
|
|
|
29
29
|
|
|
30
30
|
For more documentation on how to use operators see [mongodb](http://docs.mongodb.org/manual/reference/operator/).
|
|
31
31
|
|
|
32
|
-
Browse [package docs](http://kofrasa.
|
|
32
|
+
Browse [package docs](http://kofrasa.github.io/mingo/) for modules.
|
|
33
33
|
|
|
34
34
|
## Usage
|
|
35
35
|
|
|
@@ -63,12 +63,12 @@ To support tree-shaking for client side bundles, you can import and register spe
|
|
|
63
63
|
### ES6
|
|
64
64
|
|
|
65
65
|
```js
|
|
66
|
-
import { useOperators
|
|
66
|
+
import { useOperators } from "mingo/core";
|
|
67
67
|
import { $trunc } from "mingo/operators/expression";
|
|
68
68
|
import { $bucket } from "mingo/operators/pipeline";
|
|
69
69
|
|
|
70
|
-
useOperators(
|
|
71
|
-
useOperators(
|
|
70
|
+
useOperators("expression", { $trunc });
|
|
71
|
+
useOperators("pipeline", { $bucket });
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
### CommonJS
|
|
@@ -78,10 +78,9 @@ const core = require("mingo/core");
|
|
|
78
78
|
const $trunc = require("mingo/operators/expression").$trunc;
|
|
79
79
|
const $bucket = require("mingo/operators/pipeline").$bucket;
|
|
80
80
|
const useOperators = core.useOperators;
|
|
81
|
-
const OperatorType = core.OperatorType;
|
|
82
81
|
|
|
83
|
-
useOperators(
|
|
84
|
-
useOperators(
|
|
82
|
+
useOperators("expression", { $trunc: $trunc });
|
|
83
|
+
useOperators("pipeline", { $bucket: $bucket });
|
|
85
84
|
```
|
|
86
85
|
|
|
87
86
|
## Using query to test objects
|
|
@@ -144,14 +143,14 @@ No default implementation is provided out of the box so users can use a library
|
|
|
144
143
|
The example below uses [Ajv](https://www.npmjs.com/package/ajv) to implement schema validation.
|
|
145
144
|
|
|
146
145
|
```js
|
|
147
|
-
import {
|
|
146
|
+
import { AnyObject } from "mingo/types"
|
|
148
147
|
import { JsonSchemaValidator } from "mingo/core"
|
|
149
148
|
import Ajv, { Schema } from "ajv"
|
|
150
149
|
|
|
151
|
-
const jsonSchemaValidator: JsonSchemaValidator = (s:
|
|
150
|
+
const jsonSchemaValidator: JsonSchemaValidator = (s: AnyObject) => {
|
|
152
151
|
const ajv = new Ajv();
|
|
153
152
|
const v = ajv.compile(s as Schema);
|
|
154
|
-
return (o:
|
|
153
|
+
return (o: AnyObject) => (v(o) ? true : false);
|
|
155
154
|
};
|
|
156
155
|
|
|
157
156
|
const schema = {
|
|
@@ -183,13 +182,13 @@ find(docs, { $jsonSchema: schema }, {}, { jsonSchemaValidator }).all();
|
|
|
183
182
|
|
|
184
183
|
```js
|
|
185
184
|
import { Aggregator } from "mingo/aggregator";
|
|
186
|
-
import { useOperators
|
|
185
|
+
import { useOperators } from "mingo/core";
|
|
187
186
|
import { $match, $group } from "mingo/operators/pipeline";
|
|
188
187
|
import { $min } from "mingo/operators/accumulator";
|
|
189
188
|
|
|
190
189
|
// ensure the required operators are preloaded prior to using them.
|
|
191
|
-
useOperators(
|
|
192
|
-
useOperators(
|
|
190
|
+
useOperators("pipeline", { $match, $group });
|
|
191
|
+
useOperators("accumulator", { $min });
|
|
193
192
|
|
|
194
193
|
let agg = new Aggregator([
|
|
195
194
|
{ $match: { type: "homework" } },
|
|
@@ -208,56 +207,56 @@ let result = agg.run(collection);
|
|
|
208
207
|
|
|
209
208
|
Query and aggregation operations can be configured with options to enabled different features or customize how documents are processed. Some options are only relevant to specific operators and need not be specified if not required.
|
|
210
209
|
|
|
211
|
-
| Name | Description | Default
|
|
212
|
-
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
213
|
-
| idKey | The key that is used to lookup the ID value of a document. | "\_id"
|
|
214
|
-
| collation | [Collation](http://kofrasa.
|
|
215
|
-
| processingMode | Determines copy rules for inputs and outputs. | [CLONE_OFF](http://kofrasa.
|
|
216
|
-
| useStrictMode | Enforces strict MongoDB compatibilty. | true
|
|
217
|
-
| scriptEnabled | Enable or disable using custom script execution. | true
|
|
218
|
-
| hashFunction | Custom hash function to replace the default based on "Effective Java" hashCode. | _default_
|
|
219
|
-
| collectionResolver | Function to resolve strings to arrays for use with operators that reference other collections such as; `$lookup`, `$out` and `$merge`. | _none_
|
|
220
|
-
| jsonSchemaValidator | JSON schema validator to use for the `$jsonSchema` operator. | _none_
|
|
221
|
-
| variables | Global variables to pass to all operators | _none_
|
|
222
|
-
| context | Container to use for loading operators. | _none_
|
|
223
|
-
| useGlobalContext | Allow falling back to the global context when operator is not found in the provided context. | true
|
|
210
|
+
| Name | Description | Default | Behaviour |
|
|
211
|
+
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
212
|
+
| idKey | The key that is used to lookup the ID value of a document. | "\_id" | |
|
|
213
|
+
| collation | [Collation](http://kofrasa.github.io/mingo/interfaces/core.CollationSpec.html) specification for string sorting operations. | _none_ | See [Intl.Collator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) |
|
|
214
|
+
| processingMode | Determines copy rules for inputs and outputs. | [CLONE_OFF](http://kofrasa.github.io/mingo/enums/core.ProcessingMode.html) | Turn off cloning and modifies the input collection as needed. <br>This option will also return output objects with shared paths in their graph when specific operators are used. Provides the greatest speedup by minizing cloning. When using the aggregation pipeline, you can use the `$out` operator to collect immutable intermediate results. |
|
|
215
|
+
| useStrictMode | Enforces strict MongoDB compatibilty. | true | When disabled, behaviour changes as follows. <ul><li>`$elemMatch` returns all matching nested documents instead of only the first.</li><li>Empty string `""` is coerced to false during boolean checking in supported operators which is consistent with Javascript semantics.</li><li>`$type` returns JS native type names as follows. <ul><li>`"missing"` -> `"undefined"`</li><li>`"bool"` -> `"boolean"`</li><li> `"int"\|"long"\|"double"` -> `"number"`</li><li>`"regex"` -> `"regexp"`</li></ul><ul> |
|
|
216
|
+
| scriptEnabled | Enable or disable using custom script execution. | true | When disabled, operators that execute custom code are disallowed such as; `$where`, `$accumulator`, and `$function`. |
|
|
217
|
+
| hashFunction | Custom hash function to replace the default based on "Effective Java" hashCode. | _default_ | Expects function `(value: unknown) => number`. |
|
|
218
|
+
| collectionResolver | Function to resolve strings to arrays for use with operators that reference other collections such as; `$lookup`, `$out` and `$merge`. | _none_ | Expects function `(name: string) => AnyObject[]` |
|
|
219
|
+
| jsonSchemaValidator | JSON schema validator to use for the `$jsonSchema` operator. | _none_ | Expects function `(schema: AnyObject) => (document: AnyObject) => boolean`.<br> The `$jsonSchema` operation would fail if a validator is not provided. |
|
|
220
|
+
| variables | Global variables to pass to all operators | _none_ | |
|
|
221
|
+
| context | Container to use for loading operators. | _none_ | This option allow users to load only desired operators or register custom operators which need not be available globally. |
|
|
222
|
+
| useGlobalContext | Allow falling back to the global context when operator is not found in the provided context. | true | This is provided to allow users to strictly enforce which operators may be usable. |
|
|
224
223
|
|
|
225
224
|
## Adding Custom Operators
|
|
226
225
|
|
|
227
|
-
Custom operators can be registered using `Context` via the `context` option which is the recommended way from `6.4.2`. The `Context` is a container for operators, that the execution engine will use to process queries. Previously, the [useOperators(...)](
|
|
226
|
+
Custom operators can be registered using `Context` via the `context` option which is the recommended way from `6.4.2`. The `Context` is a container for operators, that the execution engine will use to process queries. Previously, the [useOperators(...)](https://kofrasa.github.io/mingo/functions/core.useOperators.html) function was used to register operators globally but that is no longer preferred. The difference between the two is that a globally registered operator cannot be overwritten whereas a new context may be created and used at anytime.
|
|
228
227
|
|
|
229
228
|
**NB: Note that the execution engine will first try to find the operator in the context and fallback to the global context when not found.**
|
|
230
229
|
|
|
231
230
|
Each operator type has a specific interface to which an implementation must conform to be valid.
|
|
232
231
|
|
|
233
|
-
- [AccumulatorOperator](http://kofrasa.
|
|
234
|
-
- [ExpressionOperator](http://kofrasa.
|
|
235
|
-
- [ProjectionOperator](http://kofrasa.
|
|
236
|
-
- [PipelineOperator](http://kofrasa.
|
|
237
|
-
- [WindowOperator](http://kofrasa.
|
|
238
|
-
- [QueryOperator](http://kofrasa.
|
|
232
|
+
- [AccumulatorOperator](http://kofrasa.github.io/mingo/types/core.AccumulatorOperator.html)
|
|
233
|
+
- [ExpressionOperator](http://kofrasa.github.io/mingo/types/core.ExpressionOperator.html)
|
|
234
|
+
- [ProjectionOperator](http://kofrasa.github.io/mingo/types/core.ProjectionOperator.html)
|
|
235
|
+
- [PipelineOperator](http://kofrasa.github.io/mingo/types/core.PipelineOperator.html)
|
|
236
|
+
- [WindowOperator](http://kofrasa.github.io/mingo/types/core.WindowOperator.html)
|
|
237
|
+
- [QueryOperator](http://kofrasa.github.io/mingo/types/core.QueryOperator.html)
|
|
239
238
|
|
|
240
239
|
Pre-loaded operators defined [here](https://github.com/kofrasa/mingo/blob/master/src/init/basic.ts) cannot be overridden. These include;
|
|
241
240
|
|
|
242
|
-
- All [query](http://kofrasa.
|
|
243
|
-
- All [projection](http://kofrasa.
|
|
244
|
-
- Expression operators for [boolean](http://kofrasa.
|
|
245
|
-
- Pipeline [operators](http://kofrasa.
|
|
241
|
+
- All [query](http://kofrasa.github.io/mingo/modules/operators_query.html) operators.
|
|
242
|
+
- All [projection](http://kofrasa.github.io/mingo/modules/operators_projection.html) operators.
|
|
243
|
+
- Expression operators for [boolean](http://kofrasa.github.io/mingo/modules/operators_expression_boolean.html) and [comparison](http://kofrasa.github.io/mingo/modules/operators_expression_comparison.html).
|
|
244
|
+
- Pipeline [operators](http://kofrasa.github.io/mingo/modules/operators_pipeline.html); `$project`, `$skip`, `$limit`, and `$sort`.
|
|
246
245
|
|
|
247
246
|
> NB: _Update operators is not supported in `Context`._
|
|
248
247
|
|
|
249
248
|
## Updating Documents
|
|
250
249
|
|
|
251
|
-
An update operation can be performed using the `
|
|
250
|
+
An update operation can be performed using the `update` function from the `mingo/updater` module. Unlike other operations in the library, this only works on a single object.
|
|
252
251
|
The query and aggregation operators are powerful enough to use for transforming arrays of documents and should be preferred when dealing with multiple objects.
|
|
253
|
-
`
|
|
252
|
+
`update` returns an array of all paths that were updated. It also supports [arrayFilters](https://www.mongodb.com/docs/manual/release-notes/3.6/#std-label-3.6-arrayFilters) for applicable operators. To detect whether a change occured you can check the length of the returned array.
|
|
254
253
|
|
|
255
254
|
All operators as of MongoDB 5.0 are supported except the positional array operator `$`.
|
|
256
255
|
|
|
257
256
|
### Examples
|
|
258
257
|
|
|
259
258
|
```ts
|
|
260
|
-
import {
|
|
259
|
+
import { update } from "mingo";
|
|
261
260
|
// all update operators are automatically loaded.
|
|
262
261
|
|
|
263
262
|
const obj = {
|
|
@@ -268,16 +267,16 @@ const obj = {
|
|
|
268
267
|
};
|
|
269
268
|
|
|
270
269
|
// returns array of modified paths if value changed.
|
|
271
|
-
|
|
270
|
+
update(obj, { $set: { firstName: "Bob", lastName: "Doe" } }); // ["firstName", "lastName"]
|
|
272
271
|
|
|
273
272
|
// update nested values.
|
|
274
|
-
|
|
273
|
+
update(obj, { $pop: { friends: 1 } }); // ["friends"] => friends: ["Scooby", "Shagy"]
|
|
275
274
|
// update nested value path
|
|
276
|
-
|
|
275
|
+
update(obj, { $unset: { "friends.1": "" } }); // ["friends.1"] => friends: ["Scooby", null]
|
|
277
276
|
// update with condition
|
|
278
|
-
|
|
277
|
+
update(obj, { $set: { "friends.$[e]": "Velma" } }, [{ e: null }]); // ["friends"] => friends: ["Scooby", "Velma"]
|
|
279
278
|
// empty array returned if value has not changed.
|
|
280
|
-
|
|
279
|
+
update(obj, { $set: { fristName: "Bob" } }); // [] => no change to object.
|
|
281
280
|
```
|
|
282
281
|
|
|
283
282
|
You can also create a preconfigured updater function.
|
|
@@ -286,14 +285,14 @@ You can also create a preconfigured updater function.
|
|
|
286
285
|
import { createUpdater } from "mingo/updater";
|
|
287
286
|
|
|
288
287
|
// configure updater to deep clone passed values. clone mode defaults to "copy".
|
|
289
|
-
const
|
|
288
|
+
const updateState = createUpdater({ cloneMode: "deep" });
|
|
290
289
|
|
|
291
290
|
const state = { people: ["Fred", "John"] };
|
|
292
291
|
const newPeople = ["Amy", "Mark"];
|
|
293
292
|
|
|
294
293
|
console.log(state.people); // ["Fred", "John"]
|
|
295
294
|
|
|
296
|
-
|
|
295
|
+
updateState(state, { $set: { people: newPeople } });
|
|
297
296
|
|
|
298
297
|
newPeople.push("Jason");
|
|
299
298
|
|
|
@@ -303,15 +302,21 @@ console.log(newPeople); // ["Amy", "Mark", "Jason"]
|
|
|
303
302
|
|
|
304
303
|
## Differences from MongoDB
|
|
305
304
|
|
|
306
|
-
|
|
305
|
+
Below is a description of how this library differs from the full MongoDB query engine.
|
|
307
306
|
|
|
308
|
-
1. There is no concept of a collection. Input
|
|
307
|
+
1. There is no concept of a collection. Input is an array, generator or iterable of objects.
|
|
308
|
+
1. Support a single numeric type `number`.
|
|
309
|
+
1. When `useStrictMode` is `false`, replace MongoDB [types](https://www.mongodb.com/docs/manual/reference/operator/aggregation/type/#available-types) with JS native types as follows;
|
|
310
|
+
- `"bool"` -> `"boolean"`.
|
|
311
|
+
- `"int"|"long"|"double"|"decimal"` -> `"number"`.
|
|
312
|
+
- `"missing"` -> `"undefined"`.
|
|
313
|
+
1. Does not support [types](https://www.mongodb.com/docs/manual/reference/operator/aggregation/type/#available-types) `"minKey"`, `"maxKey"`, `"timestamp"`, or `"binData"`.
|
|
309
314
|
1. Does not support server specific operators. E.g. `$collStat`, `$planCacheStats`, `$listSessions`.
|
|
310
|
-
1. Does not support geometry query operators.
|
|
315
|
+
1. Does not support geometry query operators.
|
|
311
316
|
1. Does not support query operators dependent on persistent storage; `$comment`, `$meta`, `$text`.
|
|
312
317
|
1. Does not support positional query or update operator `$`.
|
|
313
318
|
1. Does not support server specific expression operators; `$toObjectId`, `$binarySize`, `bsonSize`.
|
|
314
|
-
1. Agregation pipeline operator `$merge` enforces unique constraint on the lookup field
|
|
319
|
+
1. Agregation pipeline operator `$merge` enforces unique constraint on the lookup field during input processing.
|
|
315
320
|
1. Custom function evaluation operators; `$where`, `$function`, and `$accumulator`, do not accept strings as the function body.
|
|
316
321
|
1. Custom function evaluation operators are enabled by default. They can be disabled with the `scriptEnabled` option.
|
|
317
322
|
1. Custom function evaluation operator [$accumulator](https://docs.mongodb.com/manual/reference/operator/aggregation/accumulator/) does not support the `merge` option.
|
|
@@ -331,9 +336,9 @@ This list describes how this library differs from the full MongoDB query engine.
|
|
|
331
336
|
- Run `npm test` to build and run unit tests.
|
|
332
337
|
- Submit pull request.
|
|
333
338
|
|
|
334
|
-
To validate correct behaviour and semantics of operators, you may also test against [mongoplayground.net](https://mongoplayground.net/).
|
|
339
|
+
To validate correct behaviour and semantics of operators, you may also test against [mongoplayground.net](https://mongoplayground.net/). Credit to the author _[@feliix](https://github.com/feliixx)_.
|
|
335
340
|
|
|
336
|
-
|
|
341
|
+
A big thank you to all users and [CONTRIBUTORS](https://github.com/kofrasa/mingo/graphs/contributors) of this library.
|
|
337
342
|
|
|
338
343
|
## License
|
|
339
344
|
|
|
@@ -24,41 +24,40 @@ var import_core = require("./core");
|
|
|
24
24
|
var import_lazy = require("./lazy");
|
|
25
25
|
var import_util = require("./util");
|
|
26
26
|
class Aggregator {
|
|
27
|
+
#pipeline;
|
|
28
|
+
#options;
|
|
27
29
|
constructor(pipeline, options) {
|
|
28
|
-
this
|
|
29
|
-
this
|
|
30
|
+
this.#pipeline = pipeline;
|
|
31
|
+
this.#options = (0, import_core.initOptions)(options);
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
|
-
* Returns an
|
|
34
|
+
* Returns an {@link Iterator} for lazy evaluation of the pipeline.
|
|
33
35
|
*
|
|
34
36
|
* @param {*} collection An array or iterator object
|
|
35
37
|
* @returns {Iterator} an iterator object
|
|
36
38
|
*/
|
|
37
|
-
stream(collection) {
|
|
39
|
+
stream(collection, options) {
|
|
38
40
|
let iterator = (0, import_lazy.Lazy)(collection);
|
|
39
|
-
const
|
|
41
|
+
const opts = options ?? this.#options;
|
|
42
|
+
const mode = opts.processingMode;
|
|
40
43
|
if (mode == import_core.ProcessingMode.CLONE_ALL || mode == import_core.ProcessingMode.CLONE_INPUT) {
|
|
41
44
|
iterator.map(import_util.cloneDeep);
|
|
42
45
|
}
|
|
43
|
-
const
|
|
44
|
-
if (!(0, import_util.isEmpty)(this
|
|
45
|
-
for (const operator of this
|
|
46
|
+
const stages = new Array();
|
|
47
|
+
if (!(0, import_util.isEmpty)(this.#pipeline)) {
|
|
48
|
+
for (const operator of this.#pipeline) {
|
|
46
49
|
const operatorKeys = Object.keys(operator);
|
|
47
50
|
const opName = operatorKeys[0];
|
|
48
|
-
const call = (0, import_core.getOperator)(
|
|
49
|
-
import_core.OperatorType.PIPELINE,
|
|
50
|
-
opName,
|
|
51
|
-
this.options
|
|
52
|
-
);
|
|
51
|
+
const call = (0, import_core.getOperator)("pipeline", opName, opts);
|
|
53
52
|
(0, import_util.assert)(
|
|
54
53
|
operatorKeys.length === 1 && !!call,
|
|
55
54
|
`invalid pipeline operator ${opName}`
|
|
56
55
|
);
|
|
57
|
-
|
|
58
|
-
iterator = call(iterator, operator[opName],
|
|
56
|
+
stages.push(opName);
|
|
57
|
+
iterator = call(iterator, operator[opName], opts);
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
|
-
if (mode == import_core.ProcessingMode.CLONE_OUTPUT || mode == import_core.ProcessingMode.CLONE_ALL && !!(0, import_util.intersection)([["$group", "$unwind"],
|
|
60
|
+
if (mode == import_core.ProcessingMode.CLONE_OUTPUT || mode == import_core.ProcessingMode.CLONE_ALL && !!(0, import_util.intersection)([["$group", "$unwind"], stages]).length) {
|
|
62
61
|
iterator.map(import_util.cloneDeep);
|
|
63
62
|
}
|
|
64
63
|
return iterator;
|
|
@@ -66,11 +65,10 @@ class Aggregator {
|
|
|
66
65
|
/**
|
|
67
66
|
* Return the results of the aggregation as an array.
|
|
68
67
|
*
|
|
69
|
-
* @param
|
|
70
|
-
* @param {*} query
|
|
68
|
+
* @param collection
|
|
71
69
|
*/
|
|
72
|
-
run(collection) {
|
|
73
|
-
return this.stream(collection).value();
|
|
70
|
+
run(collection, options) {
|
|
71
|
+
return this.stream(collection, options).value();
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
// Annotate the CommonJS export names for ESM import in node:
|