@valkey/valkey-glide-darwin-x64 1.1.0-rc10
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/.ort.yml +9 -0
- package/.prettierignore +7 -0
- package/DEVELOPER.md +186 -0
- package/README.md +39 -0
- package/THIRD_PARTY_LICENSES_NODE +35675 -0
- package/build-ts/index.d.ts +11 -0
- package/build-ts/index.js +31 -0
- package/build-ts/index.js.map +1 -0
- package/build-ts/src/BaseClient.d.ts +5064 -0
- package/build-ts/src/BaseClient.js +6290 -0
- package/build-ts/src/BaseClient.js.map +1 -0
- package/build-ts/src/Commands.d.ts +1001 -0
- package/build-ts/src/Commands.js +2688 -0
- package/build-ts/src/Commands.js.map +1 -0
- package/build-ts/src/Errors.d.ts +21 -0
- package/build-ts/src/Errors.js +43 -0
- package/build-ts/src/Errors.js.map +1 -0
- package/build-ts/src/GlideClient.d.ts +732 -0
- package/build-ts/src/GlideClient.js +885 -0
- package/build-ts/src/GlideClient.js.map +1 -0
- package/build-ts/src/GlideClusterClient.d.ts +1044 -0
- package/build-ts/src/GlideClusterClient.js +1173 -0
- package/build-ts/src/GlideClusterClient.js.map +1 -0
- package/build-ts/src/Logger.d.ts +31 -0
- package/build-ts/src/Logger.js +65 -0
- package/build-ts/src/Logger.js.map +1 -0
- package/build-ts/src/ProtobufMessage.d.ts +2 -0
- package/build-ts/src/ProtobufMessage.js +7276 -0
- package/build-ts/src/ProtobufMessage.js.map +1 -0
- package/build-ts/src/Transaction.d.ts +2988 -0
- package/build-ts/src/Transaction.js +3414 -0
- package/build-ts/src/Transaction.js.map +1 -0
- package/index.ts +12 -0
- package/node_modules/glide-rs/glide-rs.darwin-x64.node +0 -0
- package/node_modules/glide-rs/index.d.ts +67 -0
- package/node_modules/glide-rs/index.js +311 -0
- package/node_modules/glide-rs/package.json +70 -0
- package/npm/glide/index.ts +315 -0
- package/npm/glide/package.json +67 -0
- package/npm/glide/tsconfig.json +30 -0
- package/package.json +86 -0
- package/rust-client/node_modules/async/CHANGELOG.md +351 -0
- package/rust-client/node_modules/async/LICENSE +19 -0
- package/rust-client/node_modules/async/README.md +59 -0
- package/rust-client/node_modules/async/all.js +119 -0
- package/rust-client/node_modules/async/allLimit.js +46 -0
- package/rust-client/node_modules/async/allSeries.js +45 -0
- package/rust-client/node_modules/async/any.js +122 -0
- package/rust-client/node_modules/async/anyLimit.js +47 -0
- package/rust-client/node_modules/async/anySeries.js +46 -0
- package/rust-client/node_modules/async/apply.js +11 -0
- package/rust-client/node_modules/async/applyEach.js +57 -0
- package/rust-client/node_modules/async/applyEachSeries.js +37 -0
- package/rust-client/node_modules/async/asyncify.js +118 -0
- package/rust-client/node_modules/async/auto.js +333 -0
- package/rust-client/node_modules/async/autoInject.js +182 -0
- package/rust-client/node_modules/async/bower.json +17 -0
- package/rust-client/node_modules/async/cargo.js +63 -0
- package/rust-client/node_modules/async/cargoQueue.js +71 -0
- package/rust-client/node_modules/async/compose.js +55 -0
- package/rust-client/node_modules/async/concat.js +115 -0
- package/rust-client/node_modules/async/concatLimit.js +60 -0
- package/rust-client/node_modules/async/concatSeries.js +41 -0
- package/rust-client/node_modules/async/constant.js +14 -0
- package/rust-client/node_modules/async/detect.js +96 -0
- package/rust-client/node_modules/async/detectLimit.js +48 -0
- package/rust-client/node_modules/async/detectSeries.js +47 -0
- package/rust-client/node_modules/async/dir.js +43 -0
- package/rust-client/node_modules/async/dist/async.js +6061 -0
- package/rust-client/node_modules/async/dist/async.min.js +1 -0
- package/rust-client/node_modules/async/dist/async.mjs +5948 -0
- package/rust-client/node_modules/async/doDuring.js +68 -0
- package/rust-client/node_modules/async/doUntil.js +46 -0
- package/rust-client/node_modules/async/doWhilst.js +68 -0
- package/rust-client/node_modules/async/during.js +78 -0
- package/rust-client/node_modules/async/each.js +129 -0
- package/rust-client/node_modules/async/eachLimit.js +50 -0
- package/rust-client/node_modules/async/eachOf.js +185 -0
- package/rust-client/node_modules/async/eachOfLimit.js +47 -0
- package/rust-client/node_modules/async/eachOfSeries.js +39 -0
- package/rust-client/node_modules/async/eachSeries.js +44 -0
- package/rust-client/node_modules/async/ensureAsync.js +67 -0
- package/rust-client/node_modules/async/every.js +119 -0
- package/rust-client/node_modules/async/everyLimit.js +46 -0
- package/rust-client/node_modules/async/everySeries.js +45 -0
- package/rust-client/node_modules/async/filter.js +93 -0
- package/rust-client/node_modules/async/filterLimit.js +45 -0
- package/rust-client/node_modules/async/filterSeries.js +43 -0
- package/rust-client/node_modules/async/find.js +96 -0
- package/rust-client/node_modules/async/findLimit.js +48 -0
- package/rust-client/node_modules/async/findSeries.js +47 -0
- package/rust-client/node_modules/async/flatMap.js +115 -0
- package/rust-client/node_modules/async/flatMapLimit.js +60 -0
- package/rust-client/node_modules/async/flatMapSeries.js +41 -0
- package/rust-client/node_modules/async/foldl.js +153 -0
- package/rust-client/node_modules/async/foldr.js +41 -0
- package/rust-client/node_modules/async/forEach.js +129 -0
- package/rust-client/node_modules/async/forEachLimit.js +50 -0
- package/rust-client/node_modules/async/forEachOf.js +185 -0
- package/rust-client/node_modules/async/forEachOfLimit.js +47 -0
- package/rust-client/node_modules/async/forEachOfSeries.js +39 -0
- package/rust-client/node_modules/async/forEachSeries.js +44 -0
- package/rust-client/node_modules/async/forever.js +68 -0
- package/rust-client/node_modules/async/groupBy.js +108 -0
- package/rust-client/node_modules/async/groupByLimit.js +71 -0
- package/rust-client/node_modules/async/groupBySeries.js +36 -0
- package/rust-client/node_modules/async/index.js +588 -0
- package/rust-client/node_modules/async/inject.js +153 -0
- package/rust-client/node_modules/async/internal/DoublyLinkedList.js +92 -0
- package/rust-client/node_modules/async/internal/Heap.js +120 -0
- package/rust-client/node_modules/async/internal/applyEach.js +29 -0
- package/rust-client/node_modules/async/internal/asyncEachOfLimit.js +75 -0
- package/rust-client/node_modules/async/internal/awaitify.js +28 -0
- package/rust-client/node_modules/async/internal/breakLoop.js +10 -0
- package/rust-client/node_modules/async/internal/consoleFunc.js +31 -0
- package/rust-client/node_modules/async/internal/createTester.js +40 -0
- package/rust-client/node_modules/async/internal/eachOfLimit.js +90 -0
- package/rust-client/node_modules/async/internal/filter.js +55 -0
- package/rust-client/node_modules/async/internal/getIterator.js +11 -0
- package/rust-client/node_modules/async/internal/initialParams.js +14 -0
- package/rust-client/node_modules/async/internal/isArrayLike.js +10 -0
- package/rust-client/node_modules/async/internal/iterator.js +57 -0
- package/rust-client/node_modules/async/internal/map.js +30 -0
- package/rust-client/node_modules/async/internal/once.js +17 -0
- package/rust-client/node_modules/async/internal/onlyOnce.js +15 -0
- package/rust-client/node_modules/async/internal/parallel.js +34 -0
- package/rust-client/node_modules/async/internal/promiseCallback.js +23 -0
- package/rust-client/node_modules/async/internal/queue.js +294 -0
- package/rust-client/node_modules/async/internal/range.js +14 -0
- package/rust-client/node_modules/async/internal/reject.js +26 -0
- package/rust-client/node_modules/async/internal/setImmediate.js +34 -0
- package/rust-client/node_modules/async/internal/withoutIndex.js +10 -0
- package/rust-client/node_modules/async/internal/wrapAsync.js +34 -0
- package/rust-client/node_modules/async/log.js +41 -0
- package/rust-client/node_modules/async/map.js +142 -0
- package/rust-client/node_modules/async/mapLimit.js +45 -0
- package/rust-client/node_modules/async/mapSeries.js +44 -0
- package/rust-client/node_modules/async/mapValues.js +152 -0
- package/rust-client/node_modules/async/mapValuesLimit.js +61 -0
- package/rust-client/node_modules/async/mapValuesSeries.js +37 -0
- package/rust-client/node_modules/async/memoize.js +91 -0
- package/rust-client/node_modules/async/nextTick.js +52 -0
- package/rust-client/node_modules/async/package.json +75 -0
- package/rust-client/node_modules/async/parallel.js +180 -0
- package/rust-client/node_modules/async/parallelLimit.js +41 -0
- package/rust-client/node_modules/async/priorityQueue.js +60 -0
- package/rust-client/node_modules/async/queue.js +24 -0
- package/rust-client/node_modules/async/race.js +67 -0
- package/rust-client/node_modules/async/reduce.js +153 -0
- package/rust-client/node_modules/async/reduceRight.js +41 -0
- package/rust-client/node_modules/async/reflect.js +78 -0
- package/rust-client/node_modules/async/reflectAll.js +93 -0
- package/rust-client/node_modules/async/reject.js +87 -0
- package/rust-client/node_modules/async/rejectLimit.js +45 -0
- package/rust-client/node_modules/async/rejectSeries.js +43 -0
- package/rust-client/node_modules/async/retry.js +159 -0
- package/rust-client/node_modules/async/retryable.js +77 -0
- package/rust-client/node_modules/async/select.js +93 -0
- package/rust-client/node_modules/async/selectLimit.js +45 -0
- package/rust-client/node_modules/async/selectSeries.js +43 -0
- package/rust-client/node_modules/async/seq.js +79 -0
- package/rust-client/node_modules/async/series.js +186 -0
- package/rust-client/node_modules/async/setImmediate.js +45 -0
- package/rust-client/node_modules/async/some.js +122 -0
- package/rust-client/node_modules/async/someLimit.js +47 -0
- package/rust-client/node_modules/async/someSeries.js +46 -0
- package/rust-client/node_modules/async/sortBy.js +190 -0
- package/rust-client/node_modules/async/timeout.js +89 -0
- package/rust-client/node_modules/async/times.js +50 -0
- package/rust-client/node_modules/async/timesLimit.js +43 -0
- package/rust-client/node_modules/async/timesSeries.js +32 -0
- package/rust-client/node_modules/async/transform.js +173 -0
- package/rust-client/node_modules/async/tryEach.js +78 -0
- package/rust-client/node_modules/async/unmemoize.js +25 -0
- package/rust-client/node_modules/async/until.js +61 -0
- package/rust-client/node_modules/async/waterfall.js +105 -0
- package/rust-client/node_modules/async/whilst.js +78 -0
- package/rust-client/node_modules/async/wrapSync.js +118 -0
- package/rust-client/node_modules/duplexer/.travis.yml +6 -0
- package/rust-client/node_modules/duplexer/LICENCE +19 -0
- package/rust-client/node_modules/duplexer/README.md +49 -0
- package/rust-client/node_modules/duplexer/index.js +87 -0
- package/rust-client/node_modules/duplexer/package.json +42 -0
- package/rust-client/node_modules/duplexer/test/index.js +31 -0
- package/rust-client/node_modules/event-stream/.travis.yml +3 -0
- package/rust-client/node_modules/event-stream/LICENCE +24 -0
- package/rust-client/node_modules/event-stream/examples/data +3 -0
- package/rust-client/node_modules/event-stream/examples/map.js +15 -0
- package/rust-client/node_modules/event-stream/examples/pretty.js +18 -0
- package/rust-client/node_modules/event-stream/examples/split.js +12 -0
- package/rust-client/node_modules/event-stream/index.js +351 -0
- package/rust-client/node_modules/event-stream/package.json +36 -0
- package/rust-client/node_modules/event-stream/readme.markdown +345 -0
- package/rust-client/node_modules/event-stream/test/connect.asynct.js +86 -0
- package/rust-client/node_modules/event-stream/test/filter.asynct.js +17 -0
- package/rust-client/node_modules/event-stream/test/flatmap.asynct.js +17 -0
- package/rust-client/node_modules/event-stream/test/helper/index.js +12 -0
- package/rust-client/node_modules/event-stream/test/merge.asynct.js +29 -0
- package/rust-client/node_modules/event-stream/test/parse.asynct.js +32 -0
- package/rust-client/node_modules/event-stream/test/pause.asynct.js +39 -0
- package/rust-client/node_modules/event-stream/test/pipeline.asynct.js +52 -0
- package/rust-client/node_modules/event-stream/test/readArray.asynct.js +89 -0
- package/rust-client/node_modules/event-stream/test/readable.asynct.js +197 -0
- package/rust-client/node_modules/event-stream/test/replace.asynct.js +76 -0
- package/rust-client/node_modules/event-stream/test/simple-map.asynct.js +343 -0
- package/rust-client/node_modules/event-stream/test/spec.asynct.js +86 -0
- package/rust-client/node_modules/event-stream/test/split.asynct.js +47 -0
- package/rust-client/node_modules/event-stream/test/stringify.js +15 -0
- package/rust-client/node_modules/event-stream/test/writeArray.asynct.js +31 -0
- package/rust-client/node_modules/from/.npmignore +1 -0
- package/rust-client/node_modules/from/.travis.yml +6 -0
- package/rust-client/node_modules/from/LICENSE.APACHE2 +15 -0
- package/rust-client/node_modules/from/LICENSE.MIT +24 -0
- package/rust-client/node_modules/from/index.js +68 -0
- package/rust-client/node_modules/from/package.json +26 -0
- package/rust-client/node_modules/from/readme.markdown +40 -0
- package/rust-client/node_modules/from/test/index.js +210 -0
- package/rust-client/node_modules/lodash.assign/LICENSE +47 -0
- package/rust-client/node_modules/lodash.assign/README.md +18 -0
- package/rust-client/node_modules/lodash.assign/index.js +637 -0
- package/rust-client/node_modules/lodash.assign/package.json +17 -0
- package/rust-client/node_modules/map-stream/.npmignore +3 -0
- package/rust-client/node_modules/map-stream/.travis.yml +4 -0
- package/rust-client/node_modules/map-stream/LICENCE +24 -0
- package/rust-client/node_modules/map-stream/examples/pretty.js +26 -0
- package/rust-client/node_modules/map-stream/index.js +144 -0
- package/rust-client/node_modules/map-stream/package.json +24 -0
- package/rust-client/node_modules/map-stream/readme.markdown +37 -0
- package/rust-client/node_modules/map-stream/test/simple-map.asynct.js +318 -0
- package/rust-client/node_modules/mingo/LICENSE +20 -0
- package/rust-client/node_modules/mingo/README.md +340 -0
- package/rust-client/node_modules/mingo/aggregator/package.json +6 -0
- package/rust-client/node_modules/mingo/core/package.json +6 -0
- package/rust-client/node_modules/mingo/cursor/package.json +6 -0
- package/rust-client/node_modules/mingo/dist/cjs/aggregator.js +79 -0
- package/rust-client/node_modules/mingo/dist/cjs/core.js +384 -0
- package/rust-client/node_modules/mingo/dist/cjs/cursor.js +154 -0
- package/rust-client/node_modules/mingo/dist/cjs/index.js +56 -0
- package/rust-client/node_modules/mingo/dist/cjs/init/basic.js +58 -0
- package/rust-client/node_modules/mingo/dist/cjs/init/system.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/lazy.js +272 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/_predicates.js +218 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/_internal.js +55 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/accumulator.js +54 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/addToSet.js +34 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/avg.js +33 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/bottom.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/bottomN.js +42 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/count.js +27 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/covariancePop.js +29 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/covarianceSamp.js +29 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/first.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/firstN.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/index.js +69 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/last.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/lastN.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/max.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/maxN.js +37 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/median.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/mergeObjects.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/min.js +33 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/minN.js +37 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/percentile.js +50 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/push.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/stdDevPop.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/stdDevSamp.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/sum.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/top.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/topN.js +42 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/_internal.js +59 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/abs.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/add.js +42 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/ceil.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/divide.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/exp.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/floor.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/index.js +51 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/ln.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/log.js +37 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/log10.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/mod.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/multiply.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/pow.js +40 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/round.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/sqrt.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/subtract.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/trunc.js +42 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/arrayElemAt.js +45 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/arrayToObject.js +47 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/concatArrays.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/filter.js +47 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/first.js +39 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/firstN.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/in.js +33 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/index.js +63 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/indexOfArray.js +56 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/isArray.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/last.js +39 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/lastN.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/map.js +44 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/maxN.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/minN.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/nin.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/range.js +40 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/reduce.js +47 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/reverseArray.js +37 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/size.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/slice.js +53 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/sortArray.js +43 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/zip.js +65 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/bitwise/_internal.js +39 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/bitwise/bitAnd.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/bitwise/bitNot.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/bitwise/bitOr.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/bitwise/bitXor.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/bitwise/index.js +27 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/boolean/and.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/boolean/index.js +25 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/boolean/not.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/boolean/or.js +33 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/comparison/cmp.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/comparison/eq.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/comparison/gt.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/comparison/gte.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/comparison/index.js +33 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/comparison/lt.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/comparison/lte.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/comparison/ne.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/conditional/cond.js +50 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/conditional/ifNull.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/conditional/index.js +25 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/conditional/switch.js +46 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/custom/function.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/custom/index.js +21 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/_internal.js +186 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateAdd.js +60 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateDiff.js +55 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateFromParts.js +71 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateFromString.js +92 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateSubtract.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateToParts.js +52 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateToString.js +85 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dayOfMonth.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dayOfWeek.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dayOfYear.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/hour.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/index.js +59 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/isoDayOfWeek.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/isoWeek.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/isoWeekYear.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/millisecond.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/minute.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/month.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/second.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/week.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/year.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/index.js +55 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/literal.js +27 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/median.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/misc/getField.js +43 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/misc/index.js +25 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/misc/rand.js +27 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/misc/sampleRate.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/index.js +27 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/mergeObjects.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/objectToArray.js +39 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/setField.js +47 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/unsetField.js +37 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/percentile.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/allElementsTrue.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/anyElementTrue.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/index.js +33 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setDifference.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setEquals.js +34 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setIntersection.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setIsSubset.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setUnion.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/_internal.js +119 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/concat.js +34 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/index.js +57 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/indexOfBytes.js +48 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/ltrim.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/regexFind.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/regexFindAll.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/regexMatch.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/replaceAll.js +39 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/replaceOne.js +39 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/rtrim.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/split.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/strLenBytes.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/strLenCP.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/strcasecmp.js +42 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/substr.js +44 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/substrBytes.js +70 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/substrCP.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/toLower.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/toUpper.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/trim.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/_internal.js +52 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/acos.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/acosh.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/asin.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/asinh.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/atan.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/atan2.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/atanh.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/cos.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/cosh.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/degreesToRadians.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/index.js +47 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/radiansToDegrees.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/sin.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/sinh.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/tan.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/_internal.js +53 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/convert.js +71 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/index.js +39 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/isNumber.js +32 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toBool.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toDate.js +41 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toDecimal.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toDouble.js +44 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toInt.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toLong.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toString.js +43 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/type.js +45 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/variable/index.js +21 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/expression/variable/let.js +39 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/_internal.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/addFields.js +45 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/bucket.js +97 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/bucketAuto.js +102 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/count.js +39 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/facet.js +40 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/fill.js +82 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/group.js +64 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/index.js +69 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/limit.js +29 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/lookup.js +43 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/match.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/merge.js +108 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/out.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/project.js +170 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/redact.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/replaceRoot.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/replaceWith.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/sample.js +38 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/set.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/setWindowFields.js +221 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/skip.js +29 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/sort.js +91 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/sortByCount.js +33 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/unionWith.js +37 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/unset.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/unwind.js +73 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/projection/elemMatch.js +42 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/projection/index.js +23 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/projection/slice.js +39 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/array/all.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/array/elemMatch.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/array/index.js +25 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/array/size.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/bitwise/_internal.js +41 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/bitwise/bitsAllClear.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/bitwise/bitsAllSet.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/bitwise/bitsAnyClear.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/bitwise/bitsAnySet.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/bitwise/index.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/comparison/eq.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/comparison/gt.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/comparison/gte.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/comparison/in.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/comparison/index.js +48 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/comparison/lt.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/comparison/lte.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/comparison/ne.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/comparison/nin.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/element/exists.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/element/index.js +23 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/element/type.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/evaluation/expr.js +30 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/evaluation/index.js +29 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/evaluation/jsonSchema.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/evaluation/mod.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/evaluation/regex.js +28 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/evaluation/where.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/index.js +31 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/logical/and.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/logical/index.js +27 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/logical/nor.js +36 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/logical/not.js +34 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/query/logical/or.js +33 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/_internal.js +117 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/addToSet.js +50 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/bit.js +63 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/currentDate.js +42 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/inc.js +49 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/index.js +47 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/max.js +44 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/min.js +44 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/mul.js +42 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/pop.js +47 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/pull.js +53 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/pullAll.js +34 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/push.js +74 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/rename.js +42 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/set.js +44 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/update/unset.js +42 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/_internal.js +102 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/denseRank.js +37 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/derivative.js +44 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/documentNumber.js +29 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/expMovingAvg.js +54 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/index.js +37 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/integral.js +47 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/linearFill.js +73 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/locf.js +44 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/rank.js +37 -0
- package/rust-client/node_modules/mingo/dist/cjs/operators/window/shift.js +35 -0
- package/rust-client/node_modules/mingo/dist/cjs/query.js +119 -0
- package/rust-client/node_modules/mingo/dist/cjs/types.js +15 -0
- package/rust-client/node_modules/mingo/dist/cjs/updater.js +80 -0
- package/rust-client/node_modules/mingo/dist/cjs/util.js +745 -0
- package/rust-client/node_modules/mingo/dist/esm/aggregator.js +61 -0
- package/rust-client/node_modules/mingo/dist/esm/core.js +365 -0
- package/rust-client/node_modules/mingo/dist/esm/cursor.js +131 -0
- package/rust-client/node_modules/mingo/dist/esm/index.js +29 -0
- package/rust-client/node_modules/mingo/dist/esm/init/basic.js +25 -0
- package/rust-client/node_modules/mingo/dist/esm/init/system.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/lazy.js +247 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/_predicates.js +206 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/_internal.js +31 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/accumulator.js +34 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/addToSet.js +11 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/avg.js +10 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/bottom.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/bottomN.js +22 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/count.js +4 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/covariancePop.js +6 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/covarianceSamp.js +6 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/first.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/firstN.js +18 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/index.js +25 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/last.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/lastN.js +18 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/max.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/maxN.js +17 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/median.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/mergeObjects.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/min.js +10 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/minN.js +17 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/percentile.js +27 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/push.js +16 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/stdDevPop.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/stdDevSamp.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/sum.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/top.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/topN.js +22 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/_internal.js +36 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/abs.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/add.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/ceil.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/divide.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/exp.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/floor.js +15 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/index.js +16 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/ln.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/log.js +14 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/log10.js +15 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/mod.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/multiply.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/pow.js +17 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/round.js +15 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/sqrt.js +15 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/subtract.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/trunc.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/arrayElemAt.js +22 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/arrayToObject.js +24 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/concatArrays.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/filter.js +27 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/first.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/firstN.js +15 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/in.js +10 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/index.js +22 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/indexOfArray.js +33 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/isArray.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/last.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/lastN.js +15 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/map.js +24 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/maxN.js +15 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/minN.js +15 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/nin.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/range.js +17 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/reduce.js +27 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/reverseArray.js +14 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/size.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/slice.js +30 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/sortArray.js +20 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/zip.js +42 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/bitwise/_internal.js +16 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/bitwise/bitAnd.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/bitwise/bitNot.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/bitwise/bitOr.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/bitwise/bitXor.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/bitwise/index.js +4 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/boolean/and.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/boolean/index.js +3 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/boolean/not.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/boolean/or.js +10 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/comparison/cmp.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/comparison/eq.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/comparison/gt.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/comparison/gte.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/comparison/index.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/comparison/lt.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/comparison/lte.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/comparison/ne.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/conditional/cond.js +27 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/conditional/ifNull.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/conditional/index.js +3 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/conditional/switch.js +23 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/custom/function.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/custom/index.js +1 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/_internal.js +147 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateAdd.js +42 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateDiff.js +32 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateFromParts.js +53 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateFromString.js +77 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateSubtract.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateToParts.js +29 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateToString.js +70 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dayOfMonth.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dayOfWeek.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dayOfYear.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/hour.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/index.js +20 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/isoDayOfWeek.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/isoWeek.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/isoWeekYear.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/millisecond.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/minute.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/month.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/second.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/week.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/year.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/index.js +18 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/literal.js +4 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/median.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/misc/getField.js +20 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/misc/index.js +3 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/misc/rand.js +4 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/misc/sampleRate.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/index.js +4 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/mergeObjects.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/objectToArray.js +16 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/setField.js +24 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/unsetField.js +14 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/percentile.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/allElementsTrue.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/anyElementTrue.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/index.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setDifference.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setEquals.js +11 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setIntersection.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setIsSubset.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setUnion.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/_internal.js +95 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/concat.js +11 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/index.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/indexOfBytes.js +25 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/ltrim.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/regexFind.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/regexFindAll.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/regexMatch.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/replaceAll.js +16 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/replaceOne.js +16 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/rtrim.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/split.js +15 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/strLenBytes.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/strLenCP.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/strcasecmp.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/substr.js +21 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/substrBytes.js +47 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/substrCP.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/toLower.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/toUpper.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/trim.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/_internal.js +29 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/acos.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/acosh.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/asin.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/asinh.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/atan.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/atan2.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/atanh.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/cos.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/cosh.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/degreesToRadians.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/index.js +14 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/radiansToDegrees.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/sin.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/sinh.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/tan.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/_internal.js +29 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/convert.js +48 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/index.js +10 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/isNumber.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toBool.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toDate.js +18 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toDecimal.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toDouble.js +21 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toInt.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toLong.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toString.js +20 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/type.js +22 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/variable/index.js +1 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/expression/variable/let.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/_internal.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/addFields.js +22 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/bucket.js +81 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/bucketAuto.js +79 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/count.js +16 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/facet.js +17 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/fill.js +59 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/group.js +44 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/index.js +25 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/limit.js +6 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/lookup.js +20 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/match.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/merge.js +95 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/out.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/project.js +170 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/redact.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/replaceRoot.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/replaceWith.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/sample.js +15 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/set.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/setWindowFields.js +202 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/skip.js +6 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/sort.js +76 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/sortByCount.js +10 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/unionWith.js +14 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/unset.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/unwind.js +57 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/projection/elemMatch.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/projection/index.js +2 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/projection/slice.js +16 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/array/all.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/array/elemMatch.js +8 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/array/index.js +3 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/array/size.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/bitwise/_internal.js +18 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/bitwise/bitsAllClear.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/bitwise/bitsAllSet.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/bitwise/bitsAnyClear.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/bitwise/bitsAnySet.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/bitwise/index.js +10 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/comparison/eq.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/comparison/gt.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/comparison/gte.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/comparison/in.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/comparison/index.js +18 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/comparison/lt.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/comparison/lte.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/comparison/ne.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/comparison/nin.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/element/exists.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/element/index.js +2 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/element/type.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/evaluation/expr.js +7 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/evaluation/index.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/evaluation/jsonSchema.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/evaluation/mod.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/evaluation/regex.js +5 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/evaluation/where.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/index.js +6 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/logical/and.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/logical/index.js +4 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/logical/nor.js +13 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/logical/not.js +11 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/query/logical/or.js +10 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/_internal.js +99 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/addToSet.js +27 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/bit.js +40 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/currentDate.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/inc.js +26 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/index.js +14 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/max.js +21 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/min.js +21 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/mul.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/pop.js +24 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/pull.js +30 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/pullAll.js +11 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/push.js +51 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/rename.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/set.js +21 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/update/unset.js +19 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/_internal.js +77 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/denseRank.js +14 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/derivative.js +21 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/documentNumber.js +6 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/expMovingAvg.js +31 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/index.js +9 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/integral.js +24 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/linearFill.js +50 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/locf.js +21 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/rank.js +14 -0
- package/rust-client/node_modules/mingo/dist/esm/operators/window/shift.js +12 -0
- package/rust-client/node_modules/mingo/dist/esm/query.js +107 -0
- package/rust-client/node_modules/mingo/dist/esm/types.js +0 -0
- package/rust-client/node_modules/mingo/dist/esm/updater.js +46 -0
- package/rust-client/node_modules/mingo/dist/esm/util.js +674 -0
- package/rust-client/node_modules/mingo/dist/types/aggregator.d.ts +29 -0
- package/rust-client/node_modules/mingo/dist/types/core.d.ts +230 -0
- package/rust-client/node_modules/mingo/dist/types/cursor.d.ts +82 -0
- package/rust-client/node_modules/mingo/dist/types/index.d.ts +47 -0
- package/rust-client/node_modules/mingo/dist/types/init/basic.d.ts +6 -0
- package/rust-client/node_modules/mingo/dist/types/init/system.d.ts +1 -0
- package/rust-client/node_modules/mingo/dist/types/lazy.d.ts +95 -0
- package/rust-client/node_modules/mingo/dist/types/operators/_predicates.d.ts +141 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/_internal.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/accumulator.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/addToSet.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/avg.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/bottom.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/bottomN.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/count.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/covariancePop.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/covarianceSamp.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/first.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/firstN.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/index.d.ts +28 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/last.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/lastN.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/max.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/maxN.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/median.d.ts +14 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/mergeObjects.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/min.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/minN.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/percentile.d.ts +13 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/push.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/stdDevPop.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/stdDevSamp.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/sum.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/top.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/accumulator/topN.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/_internal.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/abs.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/add.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/ceil.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/divide.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/exp.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/floor.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/index.d.ts +16 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/ln.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/log.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/log10.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/mod.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/multiply.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/pow.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/round.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/sqrt.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/subtract.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/trunc.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/arrayElemAt.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/arrayToObject.d.ts +5 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/concatArrays.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/filter.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/first.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/firstN.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/in.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/index.d.ts +22 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/indexOfArray.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/isArray.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/last.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/lastN.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/map.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/maxN.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/minN.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/nin.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/range.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/reduce.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/reverseArray.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/size.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/slice.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/sortArray.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/array/zip.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/bitwise/_internal.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/bitwise/bitAnd.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/bitwise/bitNot.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/bitwise/bitOr.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/bitwise/bitXor.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/bitwise/index.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/boolean/and.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/boolean/index.d.ts +3 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/boolean/not.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/boolean/or.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/comparison/cmp.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/comparison/eq.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/comparison/gt.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/comparison/gte.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/comparison/index.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/comparison/lt.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/comparison/lte.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/comparison/ne.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/conditional/cond.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/conditional/ifNull.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/conditional/index.d.ts +3 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/conditional/switch.d.ts +13 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/custom/function.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/custom/index.d.ts +1 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/_internal.d.ts +42 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateAdd.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateDiff.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateFromParts.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateFromString.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateSubtract.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateToParts.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateToString.d.ts +22 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dayOfMonth.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dayOfWeek.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dayOfYear.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/hour.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/index.d.ts +20 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/isoDayOfWeek.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/isoWeek.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/isoWeekYear.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/millisecond.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/minute.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/month.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/second.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/week.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/date/year.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/index.d.ts +18 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/literal.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/median.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/misc/getField.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/misc/index.d.ts +3 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/misc/rand.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/misc/sampleRate.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/object/index.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/object/mergeObjects.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/object/objectToArray.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/object/setField.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/object/unsetField.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/percentile.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/set/allElementsTrue.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/set/anyElementTrue.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/set/index.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/set/setDifference.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/set/setEquals.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/set/setIntersection.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/set/setIsSubset.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/set/setUnion.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/_internal.d.ts +23 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/concat.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/index.d.ts +19 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/indexOfBytes.d.ts +13 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/ltrim.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/regexFind.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/regexFindAll.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/regexMatch.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/replaceAll.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/replaceOne.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/rtrim.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/split.d.ts +13 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/strLenBytes.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/strLenCP.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/strcasecmp.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/substr.d.ts +13 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/substrBytes.d.ts +13 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/substrCP.d.ts +5 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/toLower.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/toUpper.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/string/trim.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/_internal.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/acos.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/acosh.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/asin.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/asinh.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/atan.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/atan2.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/atanh.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/cos.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/cosh.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/degreesToRadians.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/index.d.ts +14 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/radiansToDegrees.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/sin.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/sinh.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/trignometry/tan.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/_internal.d.ts +6 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/convert.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/index.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/isNumber.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/toBool.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/toDate.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/toDecimal.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/toDouble.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/toInt.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/toLong.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/toString.d.ts +5 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/type/type.d.ts +5 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/variable/index.d.ts +1 -0
- package/rust-client/node_modules/mingo/dist/types/operators/expression/variable/let.d.ts +13 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/_internal.d.ts +23 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/addFields.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/bucket.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/bucketAuto.d.ts +12 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/count.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/facet.d.ts +6 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/fill.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/group.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/index.d.ts +28 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/limit.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/lookup.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/match.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/merge.d.ts +16 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/out.d.ts +15 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/project.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/redact.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/replaceRoot.d.ts +13 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/replaceWith.d.ts +5 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/sample.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/set.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/setWindowFields.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/skip.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/sort.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/sortByCount.d.ts +13 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/unionWith.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/unset.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/pipeline/unwind.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/projection/elemMatch.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/projection/index.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/projection/slice.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/array/all.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/array/elemMatch.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/array/index.d.ts +3 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/array/size.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/bitwise/_internal.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/bitwise/bitsAllClear.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/bitwise/bitsAllSet.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/bitwise/bitsAnyClear.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/bitwise/bitsAnySet.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/bitwise/index.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/comparison/eq.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/comparison/gt.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/comparison/gte.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/comparison/in.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/comparison/index.d.ts +8 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/comparison/lt.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/comparison/lte.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/comparison/ne.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/comparison/nin.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/element/exists.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/element/index.d.ts +2 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/element/type.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/expr.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/index.d.ts +5 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/jsonSchema.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/mod.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/regex.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/where.d.ts +10 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/index.d.ts +6 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/logical/and.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/logical/index.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/logical/nor.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/logical/not.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/query/logical/or.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/_internal.d.ts +37 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/addToSet.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/bit.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/currentDate.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/inc.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/index.d.ts +14 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/max.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/min.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/mul.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/pop.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/pull.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/pullAll.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/push.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/rename.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/set.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/update/unset.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/_internal.d.ts +11 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/denseRank.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/derivative.d.ts +6 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/documentNumber.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/expMovingAvg.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/index.d.ts +9 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/integral.d.ts +6 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/linearFill.d.ts +6 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/locf.d.ts +6 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/rank.d.ts +4 -0
- package/rust-client/node_modules/mingo/dist/types/operators/window/shift.d.ts +7 -0
- package/rust-client/node_modules/mingo/dist/types/query.d.ts +41 -0
- package/rust-client/node_modules/mingo/dist/types/types.d.ts +46 -0
- package/rust-client/node_modules/mingo/dist/types/updater.d.ts +39 -0
- package/rust-client/node_modules/mingo/dist/types/util.d.ts +228 -0
- package/rust-client/node_modules/mingo/init/basic/package.json +6 -0
- package/rust-client/node_modules/mingo/init/system/package.json +6 -0
- package/rust-client/node_modules/mingo/lazy/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/accumulator/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/arithmetic/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/array/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/bitwise/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/boolean/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/comparison/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/conditional/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/custom/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/date/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/misc/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/object/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/set/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/string/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/trignometry/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/type/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/expression/variable/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/pipeline/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/projection/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/query/array/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/query/bitwise/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/query/comparison/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/query/element/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/query/evaluation/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/query/logical/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/query/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/update/package.json +6 -0
- package/rust-client/node_modules/mingo/operators/window/package.json +6 -0
- package/rust-client/node_modules/mingo/package.json +283 -0
- package/rust-client/node_modules/mingo/query/package.json +6 -0
- package/rust-client/node_modules/mingo/types/package.json +6 -0
- package/rust-client/node_modules/mingo/updater/package.json +6 -0
- package/rust-client/node_modules/mingo/util/package.json +6 -0
- package/rust-client/node_modules/pause-stream/.npmignore +3 -0
- package/rust-client/node_modules/pause-stream/LICENSE +231 -0
- package/rust-client/node_modules/pause-stream/index.js +3 -0
- package/rust-client/node_modules/pause-stream/package.json +35 -0
- package/rust-client/node_modules/pause-stream/readme.markdown +29 -0
- package/rust-client/node_modules/pause-stream/test/index.js +17 -0
- package/rust-client/node_modules/pause-stream/test/pause-end.js +33 -0
- package/rust-client/node_modules/save/.eslintignore +1 -0
- package/rust-client/node_modules/save/.eslintrc +12 -0
- package/rust-client/node_modules/save/.prettierignore +10 -0
- package/rust-client/node_modules/save/.prettierrc +5 -0
- package/rust-client/node_modules/save/.travis.yml +5 -0
- package/rust-client/node_modules/save/LICENSE +13 -0
- package/rust-client/node_modules/save/README.md +137 -0
- package/rust-client/node_modules/save/lib/memory-engine.js +340 -0
- package/rust-client/node_modules/save/lib/save.js +77 -0
- package/rust-client/node_modules/save/package.json +52 -0
- package/rust-client/node_modules/save/test/count.js +78 -0
- package/rust-client/node_modules/save/test/create-or-update.js +72 -0
- package/rust-client/node_modules/save/test/create.js +181 -0
- package/rust-client/node_modules/save/test/delete-many.js +71 -0
- package/rust-client/node_modules/save/test/delete.js +41 -0
- package/rust-client/node_modules/save/test/engine.tests.js +38 -0
- package/rust-client/node_modules/save/test/find-one.js +75 -0
- package/rust-client/node_modules/save/test/find.js +366 -0
- package/rust-client/node_modules/save/test/id-property.js +17 -0
- package/rust-client/node_modules/save/test/memory-engine.test.js +10 -0
- package/rust-client/node_modules/save/test/read.js +82 -0
- package/rust-client/node_modules/save/test/save.test.js +11 -0
- package/rust-client/node_modules/save/test/streaming.js +135 -0
- package/rust-client/node_modules/save/test/update-many.js +28 -0
- package/rust-client/node_modules/save/test/update.js +160 -0
- package/rust-client/node_modules/split/.npmignore +3 -0
- package/rust-client/node_modules/split/.travis.yml +3 -0
- package/rust-client/node_modules/split/LICENCE +22 -0
- package/rust-client/node_modules/split/examples/pretty.js +26 -0
- package/rust-client/node_modules/split/index.js +63 -0
- package/rust-client/node_modules/split/package.json +30 -0
- package/rust-client/node_modules/split/readme.markdown +72 -0
- package/rust-client/node_modules/split/test/options.asynct.js +46 -0
- package/rust-client/node_modules/split/test/partitioned_unicode.js +34 -0
- package/rust-client/node_modules/split/test/split.asynct.js +137 -0
- package/rust-client/node_modules/split/test/try_catch.asynct.js +51 -0
- package/rust-client/node_modules/stream-combiner/.npmignore +3 -0
- package/rust-client/node_modules/stream-combiner/.travis.yml +4 -0
- package/rust-client/node_modules/stream-combiner/LICENSE +22 -0
- package/rust-client/node_modules/stream-combiner/README.md +55 -0
- package/rust-client/node_modules/stream-combiner/index.js +45 -0
- package/rust-client/node_modules/stream-combiner/package.json +22 -0
- package/rust-client/node_modules/stream-combiner/test/index.js +65 -0
- package/rust-client/node_modules/through/.travis.yml +5 -0
- package/rust-client/node_modules/through/LICENSE.APACHE2 +15 -0
- package/rust-client/node_modules/through/LICENSE.MIT +24 -0
- package/rust-client/node_modules/through/index.js +108 -0
- package/rust-client/node_modules/through/package.json +36 -0
- package/rust-client/node_modules/through/readme.markdown +64 -0
- package/rust-client/node_modules/through/test/async.js +28 -0
- package/rust-client/node_modules/through/test/auto-destroy.js +30 -0
- package/rust-client/node_modules/through/test/buffering.js +71 -0
- package/rust-client/node_modules/through/test/end.js +45 -0
- package/rust-client/node_modules/through/test/index.js +133 -0
- package/tsconfig.json +31 -0
|
@@ -0,0 +1,2688 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.TimeUnit = exports.ScoreFilter = exports.SortOrder = exports.GeoUnit = exports.ConditionalChange = exports.FlushMode = exports.BitmapIndexType = exports.FunctionRestorePolicy = exports.InsertPosition = exports.InfBoundary = exports.UpdateByScore = exports.ExpireOptions = exports.ListDirection = exports.BitFieldOverflow = exports.BitOverflowControl = exports.BitFieldIncrBy = exports.BitFieldSet = exports.BitFieldGet = exports.BitOffsetMultiplier = exports.BitOffset = exports.UnsignedEncoding = exports.SignedEncoding = exports.BitwiseOperation = exports.InfoOptions = void 0;
|
|
10
|
+
exports.parseInfoResponse = parseInfoResponse;
|
|
11
|
+
exports.createGet = createGet;
|
|
12
|
+
exports.createGetDel = createGetDel;
|
|
13
|
+
exports.createGetRange = createGetRange;
|
|
14
|
+
exports.createSet = createSet;
|
|
15
|
+
exports.createPing = createPing;
|
|
16
|
+
exports.createInfo = createInfo;
|
|
17
|
+
exports.createDel = createDel;
|
|
18
|
+
exports.createSelect = createSelect;
|
|
19
|
+
exports.createClientGetName = createClientGetName;
|
|
20
|
+
exports.createConfigRewrite = createConfigRewrite;
|
|
21
|
+
exports.createConfigResetStat = createConfigResetStat;
|
|
22
|
+
exports.createMGet = createMGet;
|
|
23
|
+
exports.createMSet = createMSet;
|
|
24
|
+
exports.createMSetNX = createMSetNX;
|
|
25
|
+
exports.createIncr = createIncr;
|
|
26
|
+
exports.createIncrBy = createIncrBy;
|
|
27
|
+
exports.createIncrByFloat = createIncrByFloat;
|
|
28
|
+
exports.createClientId = createClientId;
|
|
29
|
+
exports.createConfigGet = createConfigGet;
|
|
30
|
+
exports.createConfigSet = createConfigSet;
|
|
31
|
+
exports.createHGet = createHGet;
|
|
32
|
+
exports.convertFieldsAndValuesToHashDataType = convertFieldsAndValuesToHashDataType;
|
|
33
|
+
exports.createHSet = createHSet;
|
|
34
|
+
exports.createHKeys = createHKeys;
|
|
35
|
+
exports.createHSetNX = createHSetNX;
|
|
36
|
+
exports.createDecr = createDecr;
|
|
37
|
+
exports.createDecrBy = createDecrBy;
|
|
38
|
+
exports.createBitOp = createBitOp;
|
|
39
|
+
exports.createGetBit = createGetBit;
|
|
40
|
+
exports.createSetBit = createSetBit;
|
|
41
|
+
exports.createBitField = createBitField;
|
|
42
|
+
exports.createHDel = createHDel;
|
|
43
|
+
exports.createHMGet = createHMGet;
|
|
44
|
+
exports.createHExists = createHExists;
|
|
45
|
+
exports.createHGetAll = createHGetAll;
|
|
46
|
+
exports.createLPush = createLPush;
|
|
47
|
+
exports.createLPushX = createLPushX;
|
|
48
|
+
exports.createLPop = createLPop;
|
|
49
|
+
exports.createLRange = createLRange;
|
|
50
|
+
exports.createLLen = createLLen;
|
|
51
|
+
exports.createLMove = createLMove;
|
|
52
|
+
exports.createBLMove = createBLMove;
|
|
53
|
+
exports.createLSet = createLSet;
|
|
54
|
+
exports.createLTrim = createLTrim;
|
|
55
|
+
exports.createLRem = createLRem;
|
|
56
|
+
exports.createRPush = createRPush;
|
|
57
|
+
exports.createRPushX = createRPushX;
|
|
58
|
+
exports.createRPop = createRPop;
|
|
59
|
+
exports.createSAdd = createSAdd;
|
|
60
|
+
exports.createSRem = createSRem;
|
|
61
|
+
exports.createSScan = createSScan;
|
|
62
|
+
exports.createSMembers = createSMembers;
|
|
63
|
+
exports.createSMove = createSMove;
|
|
64
|
+
exports.createSCard = createSCard;
|
|
65
|
+
exports.createSInter = createSInter;
|
|
66
|
+
exports.createSInterCard = createSInterCard;
|
|
67
|
+
exports.createSInterStore = createSInterStore;
|
|
68
|
+
exports.createSDiff = createSDiff;
|
|
69
|
+
exports.createSDiffStore = createSDiffStore;
|
|
70
|
+
exports.createSUnion = createSUnion;
|
|
71
|
+
exports.createSUnionStore = createSUnionStore;
|
|
72
|
+
exports.createSIsMember = createSIsMember;
|
|
73
|
+
exports.createSMIsMember = createSMIsMember;
|
|
74
|
+
exports.createSPop = createSPop;
|
|
75
|
+
exports.createSRandMember = createSRandMember;
|
|
76
|
+
exports.createCustomCommand = createCustomCommand;
|
|
77
|
+
exports.createHIncrBy = createHIncrBy;
|
|
78
|
+
exports.createHIncrByFloat = createHIncrByFloat;
|
|
79
|
+
exports.createHLen = createHLen;
|
|
80
|
+
exports.createHVals = createHVals;
|
|
81
|
+
exports.createExists = createExists;
|
|
82
|
+
exports.createUnlink = createUnlink;
|
|
83
|
+
exports.createExpire = createExpire;
|
|
84
|
+
exports.createExpireAt = createExpireAt;
|
|
85
|
+
exports.createExpireTime = createExpireTime;
|
|
86
|
+
exports.createPExpire = createPExpire;
|
|
87
|
+
exports.createPExpireAt = createPExpireAt;
|
|
88
|
+
exports.createPExpireTime = createPExpireTime;
|
|
89
|
+
exports.createTTL = createTTL;
|
|
90
|
+
exports.convertElementsAndScores = convertElementsAndScores;
|
|
91
|
+
exports.createZAdd = createZAdd;
|
|
92
|
+
exports.createZInterstore = createZInterstore;
|
|
93
|
+
exports.createZInter = createZInter;
|
|
94
|
+
exports.createZUnion = createZUnion;
|
|
95
|
+
exports.createZRem = createZRem;
|
|
96
|
+
exports.createZCard = createZCard;
|
|
97
|
+
exports.createZInterCard = createZInterCard;
|
|
98
|
+
exports.createZDiff = createZDiff;
|
|
99
|
+
exports.createZDiffWithScores = createZDiffWithScores;
|
|
100
|
+
exports.createZDiffStore = createZDiffStore;
|
|
101
|
+
exports.createZScore = createZScore;
|
|
102
|
+
exports.createZUnionStore = createZUnionStore;
|
|
103
|
+
exports.createZMScore = createZMScore;
|
|
104
|
+
exports.createScan = createScan;
|
|
105
|
+
exports.createZCount = createZCount;
|
|
106
|
+
exports.createZRange = createZRange;
|
|
107
|
+
exports.createZRangeWithScores = createZRangeWithScores;
|
|
108
|
+
exports.createZRangeStore = createZRangeStore;
|
|
109
|
+
exports.createType = createType;
|
|
110
|
+
exports.createStrlen = createStrlen;
|
|
111
|
+
exports.createLIndex = createLIndex;
|
|
112
|
+
exports.createLInsert = createLInsert;
|
|
113
|
+
exports.createZPopMin = createZPopMin;
|
|
114
|
+
exports.createZPopMax = createZPopMax;
|
|
115
|
+
exports.createEcho = createEcho;
|
|
116
|
+
exports.createPTTL = createPTTL;
|
|
117
|
+
exports.createZRemRangeByRank = createZRemRangeByRank;
|
|
118
|
+
exports.createZRemRangeByLex = createZRemRangeByLex;
|
|
119
|
+
exports.createZRemRangeByScore = createZRemRangeByScore;
|
|
120
|
+
exports.createPersist = createPersist;
|
|
121
|
+
exports.createZLexCount = createZLexCount;
|
|
122
|
+
exports.createZRank = createZRank;
|
|
123
|
+
exports.createXAdd = createXAdd;
|
|
124
|
+
exports.createXDel = createXDel;
|
|
125
|
+
exports.createXTrim = createXTrim;
|
|
126
|
+
exports.createXRange = createXRange;
|
|
127
|
+
exports.createXRevRange = createXRevRange;
|
|
128
|
+
exports.createXGroupCreateConsumer = createXGroupCreateConsumer;
|
|
129
|
+
exports.createXGroupDelConsumer = createXGroupDelConsumer;
|
|
130
|
+
exports.createTime = createTime;
|
|
131
|
+
exports.createPublish = createPublish;
|
|
132
|
+
exports.createBRPop = createBRPop;
|
|
133
|
+
exports.createBLPop = createBLPop;
|
|
134
|
+
exports.createFCall = createFCall;
|
|
135
|
+
exports.createFCallReadOnly = createFCallReadOnly;
|
|
136
|
+
exports.createFunctionDelete = createFunctionDelete;
|
|
137
|
+
exports.createFunctionFlush = createFunctionFlush;
|
|
138
|
+
exports.createFunctionLoad = createFunctionLoad;
|
|
139
|
+
exports.createFunctionList = createFunctionList;
|
|
140
|
+
exports.createFunctionStats = createFunctionStats;
|
|
141
|
+
exports.createFunctionKill = createFunctionKill;
|
|
142
|
+
exports.createFunctionDump = createFunctionDump;
|
|
143
|
+
exports.createFunctionRestore = createFunctionRestore;
|
|
144
|
+
exports.createBitCount = createBitCount;
|
|
145
|
+
exports.createBitPos = createBitPos;
|
|
146
|
+
exports.convertKeysAndEntries = convertKeysAndEntries;
|
|
147
|
+
exports.createXRead = createXRead;
|
|
148
|
+
exports.createXReadGroup = createXReadGroup;
|
|
149
|
+
exports.createXInfoStream = createXInfoStream;
|
|
150
|
+
exports.createXInfoGroups = createXInfoGroups;
|
|
151
|
+
exports.createXLen = createXLen;
|
|
152
|
+
exports.createXPending = createXPending;
|
|
153
|
+
exports.createXInfoConsumers = createXInfoConsumers;
|
|
154
|
+
exports.createXClaim = createXClaim;
|
|
155
|
+
exports.createXAutoClaim = createXAutoClaim;
|
|
156
|
+
exports.createXGroupCreate = createXGroupCreate;
|
|
157
|
+
exports.createXGroupDestroy = createXGroupDestroy;
|
|
158
|
+
exports.createRename = createRename;
|
|
159
|
+
exports.createRenameNX = createRenameNX;
|
|
160
|
+
exports.createPfAdd = createPfAdd;
|
|
161
|
+
exports.createPfCount = createPfCount;
|
|
162
|
+
exports.createPfMerge = createPfMerge;
|
|
163
|
+
exports.createObjectEncoding = createObjectEncoding;
|
|
164
|
+
exports.createObjectFreq = createObjectFreq;
|
|
165
|
+
exports.createObjectIdletime = createObjectIdletime;
|
|
166
|
+
exports.createObjectRefcount = createObjectRefcount;
|
|
167
|
+
exports.createLolwut = createLolwut;
|
|
168
|
+
exports.createFlushAll = createFlushAll;
|
|
169
|
+
exports.createFlushDB = createFlushDB;
|
|
170
|
+
exports.createCopy = createCopy;
|
|
171
|
+
exports.createMove = createMove;
|
|
172
|
+
exports.createDump = createDump;
|
|
173
|
+
exports.createRestore = createRestore;
|
|
174
|
+
exports.createLPos = createLPos;
|
|
175
|
+
exports.createDBSize = createDBSize;
|
|
176
|
+
exports.createGeoAdd = createGeoAdd;
|
|
177
|
+
exports.createGeoPos = createGeoPos;
|
|
178
|
+
exports.createGeoDist = createGeoDist;
|
|
179
|
+
exports.createGeoHash = createGeoHash;
|
|
180
|
+
exports.createGeoSearch = createGeoSearch;
|
|
181
|
+
exports.createGeoSearchStore = createGeoSearchStore;
|
|
182
|
+
exports.createZRevRank = createZRevRank;
|
|
183
|
+
exports.createZRevRankWithScore = createZRevRankWithScore;
|
|
184
|
+
exports.createZMPop = createZMPop;
|
|
185
|
+
exports.createBZMPop = createBZMPop;
|
|
186
|
+
exports.createZIncrBy = createZIncrBy;
|
|
187
|
+
exports.createSort = createSort;
|
|
188
|
+
exports.createSortReadOnly = createSortReadOnly;
|
|
189
|
+
exports.createHStrlen = createHStrlen;
|
|
190
|
+
exports.createHRandField = createHRandField;
|
|
191
|
+
exports.createHScan = createHScan;
|
|
192
|
+
exports.createZRandMember = createZRandMember;
|
|
193
|
+
exports.createLastSave = createLastSave;
|
|
194
|
+
exports.createLCS = createLCS;
|
|
195
|
+
exports.createTouch = createTouch;
|
|
196
|
+
exports.createRandomKey = createRandomKey;
|
|
197
|
+
exports.createWatch = createWatch;
|
|
198
|
+
exports.createUnWatch = createUnWatch;
|
|
199
|
+
exports.createWait = createWait;
|
|
200
|
+
exports.createZScan = createZScan;
|
|
201
|
+
exports.createSetRange = createSetRange;
|
|
202
|
+
exports.createAppend = createAppend;
|
|
203
|
+
exports.createLMPop = createLMPop;
|
|
204
|
+
exports.createBLMPop = createBLMPop;
|
|
205
|
+
exports.createPubSubChannels = createPubSubChannels;
|
|
206
|
+
exports.createPubSubNumPat = createPubSubNumPat;
|
|
207
|
+
exports.createPubSubNumSub = createPubSubNumSub;
|
|
208
|
+
exports.createPubsubShardChannels = createPubsubShardChannels;
|
|
209
|
+
exports.createPubSubShardNumSub = createPubSubShardNumSub;
|
|
210
|
+
exports.createBZPopMax = createBZPopMax;
|
|
211
|
+
exports.createBZPopMin = createBZPopMin;
|
|
212
|
+
exports.createScriptShow = createScriptShow;
|
|
213
|
+
exports.createGetEx = createGetEx;
|
|
214
|
+
exports.createXAck = createXAck;
|
|
215
|
+
exports.createXGroupSetid = createXGroupSetid;
|
|
216
|
+
exports.createScriptExists = createScriptExists;
|
|
217
|
+
exports.createScriptFlush = createScriptFlush;
|
|
218
|
+
exports.createScriptKill = createScriptKill;
|
|
219
|
+
const glide_rs_1 = require("glide-rs");
|
|
220
|
+
const long_1 = __importDefault(require("long"));
|
|
221
|
+
const BaseClient_1 = require("./BaseClient");
|
|
222
|
+
const ProtobufMessage_1 = require("./ProtobufMessage");
|
|
223
|
+
var RequestType = ProtobufMessage_1.command_request.RequestType;
|
|
224
|
+
function isLargeCommand(args) {
|
|
225
|
+
let lenSum = 0;
|
|
226
|
+
for (const arg of args) {
|
|
227
|
+
lenSum += arg.length;
|
|
228
|
+
if (lenSum >= glide_rs_1.MAX_REQUEST_ARGS_LEN) {
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Convert a string array into Uint8Array[]
|
|
236
|
+
*/
|
|
237
|
+
function toBuffersArray(args) {
|
|
238
|
+
const argsBytes = [];
|
|
239
|
+
for (const arg of args) {
|
|
240
|
+
if (typeof arg == "string") {
|
|
241
|
+
argsBytes.push(Buffer.from(arg));
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
argsBytes.push(arg);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return argsBytes;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* @internal
|
|
251
|
+
*/
|
|
252
|
+
function parseInfoResponse(response) {
|
|
253
|
+
const lines = response.split("\n");
|
|
254
|
+
const parsedResponse = {};
|
|
255
|
+
for (const line of lines) {
|
|
256
|
+
// Ignore lines that start with '#'
|
|
257
|
+
if (!line.startsWith("#")) {
|
|
258
|
+
const [key, value] = line.trim().split(":");
|
|
259
|
+
parsedResponse[key] = value;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return parsedResponse;
|
|
263
|
+
}
|
|
264
|
+
function createCommand(requestType, args) {
|
|
265
|
+
const singleCommand = ProtobufMessage_1.command_request.Command.create({
|
|
266
|
+
requestType,
|
|
267
|
+
});
|
|
268
|
+
const argsBytes = toBuffersArray(args);
|
|
269
|
+
if (isLargeCommand(args)) {
|
|
270
|
+
// pass as a pointer
|
|
271
|
+
const pointerArr = (0, glide_rs_1.createLeakedStringVec)(argsBytes);
|
|
272
|
+
const pointer = new long_1.default(pointerArr[0], pointerArr[1]);
|
|
273
|
+
singleCommand.argsVecPointer = pointer;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
singleCommand.argsArray = ProtobufMessage_1.command_request.Command.ArgsArray.create({
|
|
277
|
+
args: argsBytes,
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
return singleCommand;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* @internal
|
|
284
|
+
*/
|
|
285
|
+
function createGet(key) {
|
|
286
|
+
return createCommand(RequestType.Get, [key]);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* @internal
|
|
290
|
+
*/
|
|
291
|
+
function createGetDel(key) {
|
|
292
|
+
return createCommand(RequestType.GetDel, [key]);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* @internal
|
|
296
|
+
*/
|
|
297
|
+
function createGetRange(key, start, end) {
|
|
298
|
+
return createCommand(RequestType.GetRange, [
|
|
299
|
+
key,
|
|
300
|
+
start.toString(),
|
|
301
|
+
end.toString(),
|
|
302
|
+
]);
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* @internal
|
|
306
|
+
*/
|
|
307
|
+
function createSet(key, value, options) {
|
|
308
|
+
const args = [key, value];
|
|
309
|
+
if (options) {
|
|
310
|
+
if (options.conditionalSet === "onlyIfExists") {
|
|
311
|
+
args.push("XX");
|
|
312
|
+
}
|
|
313
|
+
else if (options.conditionalSet === "onlyIfDoesNotExist") {
|
|
314
|
+
args.push("NX");
|
|
315
|
+
}
|
|
316
|
+
if (options.returnOldValue) {
|
|
317
|
+
args.push("GET");
|
|
318
|
+
}
|
|
319
|
+
if (options.expiry) {
|
|
320
|
+
if (options.expiry !== "keepExisting" &&
|
|
321
|
+
!Number.isInteger(options.expiry.count)) {
|
|
322
|
+
throw new Error(`Received expiry '${JSON.stringify(options.expiry)}'. Count must be an integer`);
|
|
323
|
+
}
|
|
324
|
+
if (options.expiry === "keepExisting") {
|
|
325
|
+
args.push("KEEPTTL");
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
args.push(options.expiry.type, options.expiry.count.toString());
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
return createCommand(RequestType.Set, args);
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* INFO option: a specific section of information:
|
|
336
|
+
* When no parameter is provided, the default option is assumed.
|
|
337
|
+
*/
|
|
338
|
+
var InfoOptions;
|
|
339
|
+
(function (InfoOptions) {
|
|
340
|
+
/**
|
|
341
|
+
* SERVER: General information about the server
|
|
342
|
+
*/
|
|
343
|
+
InfoOptions["Server"] = "server";
|
|
344
|
+
/**
|
|
345
|
+
* CLIENTS: Client connections section
|
|
346
|
+
*/
|
|
347
|
+
InfoOptions["Clients"] = "clients";
|
|
348
|
+
/**
|
|
349
|
+
* MEMORY: Memory consumption related information
|
|
350
|
+
*/
|
|
351
|
+
InfoOptions["Memory"] = "memory";
|
|
352
|
+
/**
|
|
353
|
+
* PERSISTENCE: RDB and AOF related information
|
|
354
|
+
*/
|
|
355
|
+
InfoOptions["Persistence"] = "persistence";
|
|
356
|
+
/**
|
|
357
|
+
* STATS: General statistics
|
|
358
|
+
*/
|
|
359
|
+
InfoOptions["Stats"] = "stats";
|
|
360
|
+
/**
|
|
361
|
+
* REPLICATION: Master/replica replication information
|
|
362
|
+
*/
|
|
363
|
+
InfoOptions["Replication"] = "replication";
|
|
364
|
+
/**
|
|
365
|
+
* CPU: CPU consumption statistics
|
|
366
|
+
*/
|
|
367
|
+
InfoOptions["Cpu"] = "cpu";
|
|
368
|
+
/**
|
|
369
|
+
* COMMANDSTATS: Valkey command statistics
|
|
370
|
+
*/
|
|
371
|
+
InfoOptions["Commandstats"] = "commandstats";
|
|
372
|
+
/**
|
|
373
|
+
* LATENCYSTATS: Valkey command latency percentile distribution statistics
|
|
374
|
+
*/
|
|
375
|
+
InfoOptions["Latencystats"] = "latencystats";
|
|
376
|
+
/**
|
|
377
|
+
* SENTINEL: Valkey Sentinel section (only applicable to Sentinel instances)
|
|
378
|
+
*/
|
|
379
|
+
InfoOptions["Sentinel"] = "sentinel";
|
|
380
|
+
/**
|
|
381
|
+
* CLUSTER: Valkey Cluster section
|
|
382
|
+
*/
|
|
383
|
+
InfoOptions["Cluster"] = "cluster";
|
|
384
|
+
/**
|
|
385
|
+
* MODULES: Modules section
|
|
386
|
+
*/
|
|
387
|
+
InfoOptions["Modules"] = "modules";
|
|
388
|
+
/**
|
|
389
|
+
* KEYSPACE: Database related statistics
|
|
390
|
+
*/
|
|
391
|
+
InfoOptions["Keyspace"] = "keyspace";
|
|
392
|
+
/**
|
|
393
|
+
* ERRORSTATS: Valkey error statistics
|
|
394
|
+
*/
|
|
395
|
+
InfoOptions["Errorstats"] = "errorstats";
|
|
396
|
+
/**
|
|
397
|
+
* ALL: Return all sections (excluding module generated ones)
|
|
398
|
+
*/
|
|
399
|
+
InfoOptions["All"] = "all";
|
|
400
|
+
/**
|
|
401
|
+
* DEFAULT: Return only the default set of sections
|
|
402
|
+
*/
|
|
403
|
+
InfoOptions["Default"] = "default";
|
|
404
|
+
/**
|
|
405
|
+
* EVERYTHING: Includes all and modules
|
|
406
|
+
*/
|
|
407
|
+
InfoOptions["Everything"] = "everything";
|
|
408
|
+
})(InfoOptions || (exports.InfoOptions = InfoOptions = {}));
|
|
409
|
+
/**
|
|
410
|
+
* @internal
|
|
411
|
+
*/
|
|
412
|
+
function createPing(str) {
|
|
413
|
+
const args = str == undefined ? [] : [str];
|
|
414
|
+
return createCommand(RequestType.Ping, args);
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* @internal
|
|
418
|
+
*/
|
|
419
|
+
function createInfo(options) {
|
|
420
|
+
const args = options == undefined ? [] : options;
|
|
421
|
+
return createCommand(RequestType.Info, args);
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* @internal
|
|
425
|
+
*/
|
|
426
|
+
function createDel(keys) {
|
|
427
|
+
return createCommand(RequestType.Del, keys);
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* @internal
|
|
431
|
+
*/
|
|
432
|
+
function createSelect(index) {
|
|
433
|
+
return createCommand(RequestType.Select, [index.toString()]);
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* @internal
|
|
437
|
+
*/
|
|
438
|
+
function createClientGetName() {
|
|
439
|
+
return createCommand(RequestType.ClientGetName, []);
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* @internal
|
|
443
|
+
*/
|
|
444
|
+
function createConfigRewrite() {
|
|
445
|
+
return createCommand(RequestType.ConfigRewrite, []);
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* @internal
|
|
449
|
+
*/
|
|
450
|
+
function createConfigResetStat() {
|
|
451
|
+
return createCommand(RequestType.ConfigResetStat, []);
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* @internal
|
|
455
|
+
*/
|
|
456
|
+
function createMGet(keys) {
|
|
457
|
+
return createCommand(RequestType.MGet, keys);
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* @internal
|
|
461
|
+
*/
|
|
462
|
+
function createMSet(keysAndValues) {
|
|
463
|
+
return createCommand(RequestType.MSet, keysAndValues.flatMap((e) => [e.key, e.value]));
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* @internal
|
|
467
|
+
*/
|
|
468
|
+
function createMSetNX(keysAndValues) {
|
|
469
|
+
return createCommand(RequestType.MSetNX, keysAndValues.flatMap((e) => [e.key, e.value]));
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* @internal
|
|
473
|
+
*/
|
|
474
|
+
function createIncr(key) {
|
|
475
|
+
return createCommand(RequestType.Incr, [key]);
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* @internal
|
|
479
|
+
*/
|
|
480
|
+
function createIncrBy(key, amount) {
|
|
481
|
+
return createCommand(RequestType.IncrBy, [key, amount.toString()]);
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* @internal
|
|
485
|
+
*/
|
|
486
|
+
function createIncrByFloat(key, amount) {
|
|
487
|
+
return createCommand(RequestType.IncrByFloat, [key, amount.toString()]);
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* @internal
|
|
491
|
+
*/
|
|
492
|
+
function createClientId() {
|
|
493
|
+
return createCommand(RequestType.ClientId, []);
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* @internal
|
|
497
|
+
*/
|
|
498
|
+
function createConfigGet(parameters) {
|
|
499
|
+
return createCommand(RequestType.ConfigGet, parameters);
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* @internal
|
|
503
|
+
*/
|
|
504
|
+
function createConfigSet(parameters) {
|
|
505
|
+
return createCommand(RequestType.ConfigSet, Object.entries(parameters).flat());
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* @internal
|
|
509
|
+
*/
|
|
510
|
+
function createHGet(key, field) {
|
|
511
|
+
return createCommand(RequestType.HGet, [key, field]);
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* This function converts an input from {@link HashDataType} or `Record` types to `HashDataType`.
|
|
515
|
+
*
|
|
516
|
+
* @param fieldsAndValues - field names and their values.
|
|
517
|
+
* @returns HashDataType array containing field names and their values.
|
|
518
|
+
*/
|
|
519
|
+
function convertFieldsAndValuesToHashDataType(fieldsAndValues) {
|
|
520
|
+
if (!Array.isArray(fieldsAndValues)) {
|
|
521
|
+
return Object.entries(fieldsAndValues).map(([field, value]) => {
|
|
522
|
+
return { field, value };
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
return fieldsAndValues;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* @internal
|
|
529
|
+
*/
|
|
530
|
+
function createHSet(key, fieldValueList) {
|
|
531
|
+
return createCommand(RequestType.HSet, [key].concat(fieldValueList
|
|
532
|
+
.map((fieldValueObject) => [
|
|
533
|
+
fieldValueObject.field,
|
|
534
|
+
fieldValueObject.value,
|
|
535
|
+
])
|
|
536
|
+
.flat()));
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* @internal
|
|
540
|
+
*/
|
|
541
|
+
function createHKeys(key) {
|
|
542
|
+
return createCommand(RequestType.HKeys, [key]);
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* @internal
|
|
546
|
+
*/
|
|
547
|
+
function createHSetNX(key, field, value) {
|
|
548
|
+
return createCommand(RequestType.HSetNX, [key, field, value]);
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* @internal
|
|
552
|
+
*/
|
|
553
|
+
function createDecr(key) {
|
|
554
|
+
return createCommand(RequestType.Decr, [key]);
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* @internal
|
|
558
|
+
*/
|
|
559
|
+
function createDecrBy(key, amount) {
|
|
560
|
+
return createCommand(RequestType.DecrBy, [key, amount.toString()]);
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Enumeration defining the bitwise operation to use in the {@link BaseClient.bitop|bitop} command. Specifies the
|
|
564
|
+
* bitwise operation to perform between the passed in keys.
|
|
565
|
+
*/
|
|
566
|
+
var BitwiseOperation;
|
|
567
|
+
(function (BitwiseOperation) {
|
|
568
|
+
BitwiseOperation["AND"] = "AND";
|
|
569
|
+
BitwiseOperation["OR"] = "OR";
|
|
570
|
+
BitwiseOperation["XOR"] = "XOR";
|
|
571
|
+
BitwiseOperation["NOT"] = "NOT";
|
|
572
|
+
})(BitwiseOperation || (exports.BitwiseOperation = BitwiseOperation = {}));
|
|
573
|
+
/**
|
|
574
|
+
* @internal
|
|
575
|
+
*/
|
|
576
|
+
function createBitOp(operation, destination, keys) {
|
|
577
|
+
return createCommand(RequestType.BitOp, [operation, destination, ...keys]);
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* @internal
|
|
581
|
+
*/
|
|
582
|
+
function createGetBit(key, offset) {
|
|
583
|
+
return createCommand(RequestType.GetBit, [key, offset.toString()]);
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* @internal
|
|
587
|
+
*/
|
|
588
|
+
function createSetBit(key, offset, value) {
|
|
589
|
+
return createCommand(RequestType.SetBit, [
|
|
590
|
+
key,
|
|
591
|
+
offset.toString(),
|
|
592
|
+
value.toString(),
|
|
593
|
+
]);
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Represents a signed argument encoding.
|
|
597
|
+
*/
|
|
598
|
+
class SignedEncoding {
|
|
599
|
+
/**
|
|
600
|
+
* Creates an instance of SignedEncoding.
|
|
601
|
+
*
|
|
602
|
+
* @param encodingLength - The bit size of the encoding. Must be less than 65 bits long.
|
|
603
|
+
*/
|
|
604
|
+
constructor(encodingLength) {
|
|
605
|
+
this.encoding = `${SignedEncoding.SIGNED_ENCODING_PREFIX}${encodingLength.toString()}`;
|
|
606
|
+
}
|
|
607
|
+
toArg() {
|
|
608
|
+
return this.encoding;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
exports.SignedEncoding = SignedEncoding;
|
|
612
|
+
SignedEncoding.SIGNED_ENCODING_PREFIX = "i";
|
|
613
|
+
/**
|
|
614
|
+
* Represents an unsigned argument encoding.
|
|
615
|
+
*/
|
|
616
|
+
class UnsignedEncoding {
|
|
617
|
+
/**
|
|
618
|
+
* Creates an instance of UnsignedEncoding.
|
|
619
|
+
*
|
|
620
|
+
* @param encodingLength - The bit size of the encoding. Must be less than 64 bits long.
|
|
621
|
+
*/
|
|
622
|
+
constructor(encodingLength) {
|
|
623
|
+
this.encoding = `${UnsignedEncoding.UNSIGNED_ENCODING_PREFIX}${encodingLength.toString()}`;
|
|
624
|
+
}
|
|
625
|
+
toArg() {
|
|
626
|
+
return this.encoding;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
exports.UnsignedEncoding = UnsignedEncoding;
|
|
630
|
+
UnsignedEncoding.UNSIGNED_ENCODING_PREFIX = "u";
|
|
631
|
+
/**
|
|
632
|
+
* Represents an offset in an array of bits for the {@link BaseClient.bitfield|bitfield} or
|
|
633
|
+
* {@link BaseClient.bitfieldReadOnly|bitfieldReadOnly} commands.
|
|
634
|
+
*
|
|
635
|
+
* For example, if we have the binary `01101001` with offset of 1 for an unsigned encoding of size 4, then the value
|
|
636
|
+
* is 13 from `0(1101)001`.
|
|
637
|
+
*/
|
|
638
|
+
class BitOffset {
|
|
639
|
+
/**
|
|
640
|
+
* Creates an instance of BitOffset.
|
|
641
|
+
*
|
|
642
|
+
* @param offset - The bit index offset in the array of bits. Must be greater than or equal to 0.
|
|
643
|
+
*/
|
|
644
|
+
constructor(offset) {
|
|
645
|
+
this.offset = offset.toString();
|
|
646
|
+
}
|
|
647
|
+
toArg() {
|
|
648
|
+
return this.offset;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
exports.BitOffset = BitOffset;
|
|
652
|
+
/**
|
|
653
|
+
* Represents an offset in an array of bits for the {@link BaseClient.bitfield|bitfield} or
|
|
654
|
+
* {@link BaseClient.bitfieldReadOnly|bitfieldReadOnly} commands. The bit offset index is calculated as the numerical
|
|
655
|
+
* value of the offset multiplied by the encoding value.
|
|
656
|
+
*
|
|
657
|
+
* For example, if we have the binary 01101001 with offset multiplier of 1 for an unsigned encoding of size 4, then the
|
|
658
|
+
* value is 9 from `0110(1001)`.
|
|
659
|
+
*/
|
|
660
|
+
class BitOffsetMultiplier {
|
|
661
|
+
/**
|
|
662
|
+
* Creates an instance of BitOffsetMultiplier.
|
|
663
|
+
*
|
|
664
|
+
* @param offset - The offset in the array of bits, which will be multiplied by the encoding value to get the final
|
|
665
|
+
* bit index offset.
|
|
666
|
+
*/
|
|
667
|
+
constructor(offset) {
|
|
668
|
+
this.offset = `${BitOffsetMultiplier.OFFSET_MULTIPLIER_PREFIX}${offset.toString()}`;
|
|
669
|
+
}
|
|
670
|
+
toArg() {
|
|
671
|
+
return this.offset;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
exports.BitOffsetMultiplier = BitOffsetMultiplier;
|
|
675
|
+
BitOffsetMultiplier.OFFSET_MULTIPLIER_PREFIX = "#";
|
|
676
|
+
/**
|
|
677
|
+
* Represents the "GET" subcommand for getting a value in the binary representation of the string stored in `key`.
|
|
678
|
+
*/
|
|
679
|
+
class BitFieldGet {
|
|
680
|
+
/**
|
|
681
|
+
* Creates an instance of BitFieldGet.
|
|
682
|
+
*
|
|
683
|
+
* @param encoding - The bit encoding for the subcommand.
|
|
684
|
+
* @param offset - The offset in the array of bits from which to get the value.
|
|
685
|
+
*/
|
|
686
|
+
constructor(encoding, offset) {
|
|
687
|
+
this.encoding = encoding;
|
|
688
|
+
this.offset = offset;
|
|
689
|
+
}
|
|
690
|
+
toArgs() {
|
|
691
|
+
return [
|
|
692
|
+
BitFieldGet.GET_COMMAND_STRING,
|
|
693
|
+
this.encoding.toArg(),
|
|
694
|
+
this.offset.toArg(),
|
|
695
|
+
];
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
exports.BitFieldGet = BitFieldGet;
|
|
699
|
+
BitFieldGet.GET_COMMAND_STRING = "GET";
|
|
700
|
+
/**
|
|
701
|
+
* Represents the "SET" subcommand for setting bits in the binary representation of the string stored in `key`.
|
|
702
|
+
*/
|
|
703
|
+
class BitFieldSet {
|
|
704
|
+
/**
|
|
705
|
+
* Creates an instance of BitFieldSet
|
|
706
|
+
*
|
|
707
|
+
* @param encoding - The bit encoding for the subcommand.
|
|
708
|
+
* @param offset - The offset in the array of bits where the value will be set.
|
|
709
|
+
* @param value - The value to set the bits in the binary value to.
|
|
710
|
+
*/
|
|
711
|
+
constructor(encoding, offset, value) {
|
|
712
|
+
this.encoding = encoding;
|
|
713
|
+
this.offset = offset;
|
|
714
|
+
this.value = value;
|
|
715
|
+
}
|
|
716
|
+
toArgs() {
|
|
717
|
+
return [
|
|
718
|
+
BitFieldSet.SET_COMMAND_STRING,
|
|
719
|
+
this.encoding.toArg(),
|
|
720
|
+
this.offset.toArg(),
|
|
721
|
+
this.value.toString(),
|
|
722
|
+
];
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
exports.BitFieldSet = BitFieldSet;
|
|
726
|
+
BitFieldSet.SET_COMMAND_STRING = "SET";
|
|
727
|
+
/**
|
|
728
|
+
* Represents the "INCRBY" subcommand for increasing or decreasing bits in the binary representation of the string
|
|
729
|
+
* stored in `key`.
|
|
730
|
+
*/
|
|
731
|
+
class BitFieldIncrBy {
|
|
732
|
+
/**
|
|
733
|
+
* Creates an instance of BitFieldIncrBy
|
|
734
|
+
*
|
|
735
|
+
* @param encoding - The bit encoding for the subcommand.
|
|
736
|
+
* @param offset - The offset in the array of bits where the value will be incremented.
|
|
737
|
+
* @param increment - The value to increment the bits in the binary value by.
|
|
738
|
+
*/
|
|
739
|
+
constructor(encoding, offset, increment) {
|
|
740
|
+
this.encoding = encoding;
|
|
741
|
+
this.offset = offset;
|
|
742
|
+
this.increment = increment;
|
|
743
|
+
}
|
|
744
|
+
toArgs() {
|
|
745
|
+
return [
|
|
746
|
+
BitFieldIncrBy.INCRBY_COMMAND_STRING,
|
|
747
|
+
this.encoding.toArg(),
|
|
748
|
+
this.offset.toArg(),
|
|
749
|
+
this.increment.toString(),
|
|
750
|
+
];
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
exports.BitFieldIncrBy = BitFieldIncrBy;
|
|
754
|
+
BitFieldIncrBy.INCRBY_COMMAND_STRING = "INCRBY";
|
|
755
|
+
/**
|
|
756
|
+
* Enumeration specifying bit overflow controls for the {@link BaseClient.bitfield|bitfield} command.
|
|
757
|
+
*/
|
|
758
|
+
var BitOverflowControl;
|
|
759
|
+
(function (BitOverflowControl) {
|
|
760
|
+
/**
|
|
761
|
+
* Performs modulo when overflows occur with unsigned encoding. When overflows occur with signed encoding, the value
|
|
762
|
+
* restarts at the most negative value. When underflows occur with signed encoding, the value restarts at the most
|
|
763
|
+
* positive value.
|
|
764
|
+
*/
|
|
765
|
+
BitOverflowControl["WRAP"] = "WRAP";
|
|
766
|
+
/**
|
|
767
|
+
* Underflows remain set to the minimum value, and overflows remain set to the maximum value.
|
|
768
|
+
*/
|
|
769
|
+
BitOverflowControl["SAT"] = "SAT";
|
|
770
|
+
/**
|
|
771
|
+
* Returns `None` when overflows occur.
|
|
772
|
+
*/
|
|
773
|
+
BitOverflowControl["FAIL"] = "FAIL";
|
|
774
|
+
})(BitOverflowControl || (exports.BitOverflowControl = BitOverflowControl = {}));
|
|
775
|
+
/**
|
|
776
|
+
* Represents the "OVERFLOW" subcommand that determines the result of the "SET" or "INCRBY"
|
|
777
|
+
* {@link BaseClient.bitfield|bitfield} subcommands when an underflow or overflow occurs.
|
|
778
|
+
*/
|
|
779
|
+
class BitFieldOverflow {
|
|
780
|
+
/**
|
|
781
|
+
* Creates an instance of BitFieldOverflow.
|
|
782
|
+
*
|
|
783
|
+
* @param overflowControl - The desired overflow behavior.
|
|
784
|
+
*/
|
|
785
|
+
constructor(overflowControl) {
|
|
786
|
+
this.overflowControl = overflowControl;
|
|
787
|
+
}
|
|
788
|
+
toArgs() {
|
|
789
|
+
return [BitFieldOverflow.OVERFLOW_COMMAND_STRING, this.overflowControl];
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
exports.BitFieldOverflow = BitFieldOverflow;
|
|
793
|
+
BitFieldOverflow.OVERFLOW_COMMAND_STRING = "OVERFLOW";
|
|
794
|
+
/**
|
|
795
|
+
* @internal
|
|
796
|
+
*/
|
|
797
|
+
function createBitField(key, subcommands, readOnly = false) {
|
|
798
|
+
const requestType = readOnly
|
|
799
|
+
? RequestType.BitFieldReadOnly
|
|
800
|
+
: RequestType.BitField;
|
|
801
|
+
let args = [key];
|
|
802
|
+
for (const subcommand of subcommands) {
|
|
803
|
+
args = args.concat(subcommand.toArgs());
|
|
804
|
+
}
|
|
805
|
+
return createCommand(requestType, args);
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* @internal
|
|
809
|
+
*/
|
|
810
|
+
function createHDel(key, fields) {
|
|
811
|
+
return createCommand(RequestType.HDel, [key].concat(fields));
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* @internal
|
|
815
|
+
*/
|
|
816
|
+
function createHMGet(key, fields) {
|
|
817
|
+
return createCommand(RequestType.HMGet, [key].concat(fields));
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* @internal
|
|
821
|
+
*/
|
|
822
|
+
function createHExists(key, field) {
|
|
823
|
+
return createCommand(RequestType.HExists, [key, field]);
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* @internal
|
|
827
|
+
*/
|
|
828
|
+
function createHGetAll(key) {
|
|
829
|
+
return createCommand(RequestType.HGetAll, [key]);
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* @internal
|
|
833
|
+
*/
|
|
834
|
+
function createLPush(key, elements) {
|
|
835
|
+
return createCommand(RequestType.LPush, [key].concat(elements));
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* @internal
|
|
839
|
+
*/
|
|
840
|
+
function createLPushX(key, elements) {
|
|
841
|
+
return createCommand(RequestType.LPushX, [key].concat(elements));
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* @internal
|
|
845
|
+
*/
|
|
846
|
+
function createLPop(key, count) {
|
|
847
|
+
const args = count == undefined ? [key] : [key, count.toString()];
|
|
848
|
+
return createCommand(RequestType.LPop, args);
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* @internal
|
|
852
|
+
*/
|
|
853
|
+
function createLRange(key, start, end) {
|
|
854
|
+
return createCommand(RequestType.LRange, [
|
|
855
|
+
key,
|
|
856
|
+
start.toString(),
|
|
857
|
+
end.toString(),
|
|
858
|
+
]);
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* @internal
|
|
862
|
+
*/
|
|
863
|
+
function createLLen(key) {
|
|
864
|
+
return createCommand(RequestType.LLen, [key]);
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* Enumeration representing element popping or adding direction for the List Based Commands.
|
|
868
|
+
*/
|
|
869
|
+
var ListDirection;
|
|
870
|
+
(function (ListDirection) {
|
|
871
|
+
/**
|
|
872
|
+
* Represents the option that elements should be popped from or added to the left side of a list.
|
|
873
|
+
*/
|
|
874
|
+
ListDirection["LEFT"] = "LEFT";
|
|
875
|
+
/**
|
|
876
|
+
* Represents the option that elements should be popped from or added to the right side of a list.
|
|
877
|
+
*/
|
|
878
|
+
ListDirection["RIGHT"] = "RIGHT";
|
|
879
|
+
})(ListDirection || (exports.ListDirection = ListDirection = {}));
|
|
880
|
+
/**
|
|
881
|
+
* @internal
|
|
882
|
+
*/
|
|
883
|
+
function createLMove(source, destination, whereFrom, whereTo) {
|
|
884
|
+
return createCommand(RequestType.LMove, [
|
|
885
|
+
source,
|
|
886
|
+
destination,
|
|
887
|
+
whereFrom,
|
|
888
|
+
whereTo,
|
|
889
|
+
]);
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* @internal
|
|
893
|
+
*/
|
|
894
|
+
function createBLMove(source, destination, whereFrom, whereTo, timeout) {
|
|
895
|
+
return createCommand(RequestType.BLMove, [
|
|
896
|
+
source,
|
|
897
|
+
destination,
|
|
898
|
+
whereFrom,
|
|
899
|
+
whereTo,
|
|
900
|
+
timeout.toString(),
|
|
901
|
+
]);
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* @internal
|
|
905
|
+
*/
|
|
906
|
+
function createLSet(key, index, element) {
|
|
907
|
+
return createCommand(RequestType.LSet, [key, index.toString(), element]);
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* @internal
|
|
911
|
+
*/
|
|
912
|
+
function createLTrim(key, start, end) {
|
|
913
|
+
return createCommand(RequestType.LTrim, [
|
|
914
|
+
key,
|
|
915
|
+
start.toString(),
|
|
916
|
+
end.toString(),
|
|
917
|
+
]);
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* @internal
|
|
921
|
+
*/
|
|
922
|
+
function createLRem(key, count, element) {
|
|
923
|
+
return createCommand(RequestType.LRem, [key, count.toString(), element]);
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* @internal
|
|
927
|
+
*/
|
|
928
|
+
function createRPush(key, elements) {
|
|
929
|
+
return createCommand(RequestType.RPush, [key].concat(elements));
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* @internal
|
|
933
|
+
*/
|
|
934
|
+
function createRPushX(key, elements) {
|
|
935
|
+
return createCommand(RequestType.RPushX, [key].concat(elements));
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* @internal
|
|
939
|
+
*/
|
|
940
|
+
function createRPop(key, count) {
|
|
941
|
+
const args = count == undefined ? [key] : [key, count.toString()];
|
|
942
|
+
return createCommand(RequestType.RPop, args);
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* @internal
|
|
946
|
+
*/
|
|
947
|
+
function createSAdd(key, members) {
|
|
948
|
+
return createCommand(RequestType.SAdd, [key].concat(members));
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* @internal
|
|
952
|
+
*/
|
|
953
|
+
function createSRem(key, members) {
|
|
954
|
+
return createCommand(RequestType.SRem, [key].concat(members));
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* @internal
|
|
958
|
+
*/
|
|
959
|
+
function createSScan(key, cursor, options) {
|
|
960
|
+
let args = [key, cursor];
|
|
961
|
+
if (options) {
|
|
962
|
+
args = args.concat(convertBaseScanOptionsToArgsArray(options));
|
|
963
|
+
}
|
|
964
|
+
return createCommand(RequestType.SScan, args);
|
|
965
|
+
}
|
|
966
|
+
/**
|
|
967
|
+
* @internal
|
|
968
|
+
*/
|
|
969
|
+
function createSMembers(key) {
|
|
970
|
+
return createCommand(RequestType.SMembers, [key]);
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
*
|
|
974
|
+
* @internal
|
|
975
|
+
*/
|
|
976
|
+
function createSMove(source, destination, member) {
|
|
977
|
+
return createCommand(RequestType.SMove, [source, destination, member]);
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* @internal
|
|
981
|
+
*/
|
|
982
|
+
function createSCard(key) {
|
|
983
|
+
return createCommand(RequestType.SCard, [key]);
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* @internal
|
|
987
|
+
*/
|
|
988
|
+
function createSInter(keys) {
|
|
989
|
+
return createCommand(RequestType.SInter, keys);
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* @internal
|
|
993
|
+
*/
|
|
994
|
+
function createSInterCard(keys, limit) {
|
|
995
|
+
let args = keys;
|
|
996
|
+
args.unshift(keys.length.toString());
|
|
997
|
+
if (limit != undefined) {
|
|
998
|
+
args = args.concat(["LIMIT", limit.toString()]);
|
|
999
|
+
}
|
|
1000
|
+
return createCommand(RequestType.SInterCard, args);
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* @internal
|
|
1004
|
+
*/
|
|
1005
|
+
function createSInterStore(destination, keys) {
|
|
1006
|
+
return createCommand(RequestType.SInterStore, [destination].concat(keys));
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* @internal
|
|
1010
|
+
*/
|
|
1011
|
+
function createSDiff(keys) {
|
|
1012
|
+
return createCommand(RequestType.SDiff, keys);
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* @internal
|
|
1016
|
+
*/
|
|
1017
|
+
function createSDiffStore(destination, keys) {
|
|
1018
|
+
return createCommand(RequestType.SDiffStore, [destination].concat(keys));
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* @internal
|
|
1022
|
+
*/
|
|
1023
|
+
function createSUnion(keys) {
|
|
1024
|
+
return createCommand(RequestType.SUnion, keys);
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* @internal
|
|
1028
|
+
*/
|
|
1029
|
+
function createSUnionStore(destination, keys) {
|
|
1030
|
+
return createCommand(RequestType.SUnionStore, [destination].concat(keys));
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* @internal
|
|
1034
|
+
*/
|
|
1035
|
+
function createSIsMember(key, member) {
|
|
1036
|
+
return createCommand(RequestType.SIsMember, [key, member]);
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* @internal
|
|
1040
|
+
*/
|
|
1041
|
+
function createSMIsMember(key, members) {
|
|
1042
|
+
return createCommand(RequestType.SMIsMember, [key].concat(members));
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* @internal
|
|
1046
|
+
*/
|
|
1047
|
+
function createSPop(key, count) {
|
|
1048
|
+
const args = count == undefined ? [key] : [key, count.toString()];
|
|
1049
|
+
return createCommand(RequestType.SPop, args);
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* @internal
|
|
1053
|
+
*/
|
|
1054
|
+
function createSRandMember(key, count) {
|
|
1055
|
+
const args = count == undefined ? [key] : [key, count.toString()];
|
|
1056
|
+
return createCommand(RequestType.SRandMember, args);
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* @internal
|
|
1060
|
+
*/
|
|
1061
|
+
function createCustomCommand(args) {
|
|
1062
|
+
return createCommand(RequestType.CustomCommand, args);
|
|
1063
|
+
}
|
|
1064
|
+
/**
|
|
1065
|
+
* @internal
|
|
1066
|
+
*/
|
|
1067
|
+
function createHIncrBy(key, field, amount) {
|
|
1068
|
+
return createCommand(RequestType.HIncrBy, [key, field, amount.toString()]);
|
|
1069
|
+
}
|
|
1070
|
+
/**
|
|
1071
|
+
* @internal
|
|
1072
|
+
*/
|
|
1073
|
+
function createHIncrByFloat(key, field, amount) {
|
|
1074
|
+
return createCommand(RequestType.HIncrByFloat, [
|
|
1075
|
+
key,
|
|
1076
|
+
field,
|
|
1077
|
+
amount.toString(),
|
|
1078
|
+
]);
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* @internal
|
|
1082
|
+
*/
|
|
1083
|
+
function createHLen(key) {
|
|
1084
|
+
return createCommand(RequestType.HLen, [key]);
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* @internal
|
|
1088
|
+
*/
|
|
1089
|
+
function createHVals(key) {
|
|
1090
|
+
return createCommand(RequestType.HVals, [key]);
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* @internal
|
|
1094
|
+
*/
|
|
1095
|
+
function createExists(keys) {
|
|
1096
|
+
return createCommand(RequestType.Exists, keys);
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* @internal
|
|
1100
|
+
*/
|
|
1101
|
+
function createUnlink(keys) {
|
|
1102
|
+
return createCommand(RequestType.Unlink, keys);
|
|
1103
|
+
}
|
|
1104
|
+
var ExpireOptions;
|
|
1105
|
+
(function (ExpireOptions) {
|
|
1106
|
+
/**
|
|
1107
|
+
* `HasNoExpiry` - Sets expiry only when the key has no expiry.
|
|
1108
|
+
*/
|
|
1109
|
+
ExpireOptions["HasNoExpiry"] = "NX";
|
|
1110
|
+
/**
|
|
1111
|
+
* `HasExistingExpiry` - Sets expiry only when the key has an existing expiry.
|
|
1112
|
+
*/
|
|
1113
|
+
ExpireOptions["HasExistingExpiry"] = "XX";
|
|
1114
|
+
/**
|
|
1115
|
+
* `NewExpiryGreaterThanCurrent` - Sets expiry only when the new expiry is
|
|
1116
|
+
* greater than current one.
|
|
1117
|
+
*/
|
|
1118
|
+
ExpireOptions["NewExpiryGreaterThanCurrent"] = "GT";
|
|
1119
|
+
/**
|
|
1120
|
+
* `NewExpiryLessThanCurrent` - Sets expiry only when the new expiry is less
|
|
1121
|
+
* than current one.
|
|
1122
|
+
*/
|
|
1123
|
+
ExpireOptions["NewExpiryLessThanCurrent"] = "LT";
|
|
1124
|
+
})(ExpireOptions || (exports.ExpireOptions = ExpireOptions = {}));
|
|
1125
|
+
/**
|
|
1126
|
+
* @internal
|
|
1127
|
+
*/
|
|
1128
|
+
function createExpire(key, seconds, option) {
|
|
1129
|
+
const args = option == undefined
|
|
1130
|
+
? [key, seconds.toString()]
|
|
1131
|
+
: [key, seconds.toString(), option];
|
|
1132
|
+
return createCommand(RequestType.Expire, args);
|
|
1133
|
+
}
|
|
1134
|
+
/**
|
|
1135
|
+
* @internal
|
|
1136
|
+
*/
|
|
1137
|
+
function createExpireAt(key, unixSeconds, option) {
|
|
1138
|
+
const args = option == undefined
|
|
1139
|
+
? [key, unixSeconds.toString()]
|
|
1140
|
+
: [key, unixSeconds.toString(), option];
|
|
1141
|
+
return createCommand(RequestType.ExpireAt, args);
|
|
1142
|
+
}
|
|
1143
|
+
/**
|
|
1144
|
+
* @internal
|
|
1145
|
+
*/
|
|
1146
|
+
function createExpireTime(key) {
|
|
1147
|
+
return createCommand(RequestType.ExpireTime, [key]);
|
|
1148
|
+
}
|
|
1149
|
+
/**
|
|
1150
|
+
* @internal
|
|
1151
|
+
*/
|
|
1152
|
+
function createPExpire(key, milliseconds, option) {
|
|
1153
|
+
const args = option == undefined
|
|
1154
|
+
? [key, milliseconds.toString()]
|
|
1155
|
+
: [key, milliseconds.toString(), option];
|
|
1156
|
+
return createCommand(RequestType.PExpire, args);
|
|
1157
|
+
}
|
|
1158
|
+
/**
|
|
1159
|
+
* @internal
|
|
1160
|
+
*/
|
|
1161
|
+
function createPExpireAt(key, unixMilliseconds, option) {
|
|
1162
|
+
const args = option == undefined
|
|
1163
|
+
? [key, unixMilliseconds.toString()]
|
|
1164
|
+
: [key, unixMilliseconds.toString(), option];
|
|
1165
|
+
return createCommand(RequestType.PExpireAt, args);
|
|
1166
|
+
}
|
|
1167
|
+
/**
|
|
1168
|
+
* @internal
|
|
1169
|
+
*/
|
|
1170
|
+
function createPExpireTime(key) {
|
|
1171
|
+
return createCommand(RequestType.PExpireTime, [key]);
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* @internal
|
|
1175
|
+
*/
|
|
1176
|
+
function createTTL(key) {
|
|
1177
|
+
return createCommand(RequestType.TTL, [key]);
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* Options for updating elements of a sorted set key.
|
|
1181
|
+
*/
|
|
1182
|
+
var UpdateByScore;
|
|
1183
|
+
(function (UpdateByScore) {
|
|
1184
|
+
/** Only update existing elements if the new score is less than the current score. */
|
|
1185
|
+
UpdateByScore["LESS_THAN"] = "LT";
|
|
1186
|
+
/** Only update existing elements if the new score is greater than the current score. */
|
|
1187
|
+
UpdateByScore["GREATER_THAN"] = "GT";
|
|
1188
|
+
})(UpdateByScore || (exports.UpdateByScore = UpdateByScore = {}));
|
|
1189
|
+
/**
|
|
1190
|
+
* @internal
|
|
1191
|
+
* Convert input from `Record` to `SortedSetDataType` to ensure the only one type.
|
|
1192
|
+
*/
|
|
1193
|
+
function convertElementsAndScores(membersAndScores) {
|
|
1194
|
+
if (!Array.isArray(membersAndScores)) {
|
|
1195
|
+
// convert Record<string, number> to SortedSetDataType
|
|
1196
|
+
return Object.entries(membersAndScores).map((element) => {
|
|
1197
|
+
return { element: element[0], score: element[1] };
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
return membersAndScores;
|
|
1201
|
+
}
|
|
1202
|
+
/**
|
|
1203
|
+
* @internal
|
|
1204
|
+
*/
|
|
1205
|
+
function createZAdd(key, membersAndScores, options, incr = false) {
|
|
1206
|
+
const args = [key];
|
|
1207
|
+
if (options) {
|
|
1208
|
+
if (options.conditionalChange) {
|
|
1209
|
+
if (options.conditionalChange ===
|
|
1210
|
+
ConditionalChange.ONLY_IF_DOES_NOT_EXIST &&
|
|
1211
|
+
options.updateOptions) {
|
|
1212
|
+
throw new Error(`The GT, LT, and NX options are mutually exclusive. Cannot choose both ${options.updateOptions} and NX.`);
|
|
1213
|
+
}
|
|
1214
|
+
args.push(options.conditionalChange);
|
|
1215
|
+
}
|
|
1216
|
+
if (options.updateOptions) {
|
|
1217
|
+
args.push(options.updateOptions);
|
|
1218
|
+
}
|
|
1219
|
+
if (options.changed) {
|
|
1220
|
+
args.push("CH");
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
if (incr) {
|
|
1224
|
+
args.push("INCR");
|
|
1225
|
+
}
|
|
1226
|
+
membersAndScores.forEach((p) => args.push(p.score.toString(), p.element));
|
|
1227
|
+
return createCommand(RequestType.ZAdd, args);
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* @internal
|
|
1231
|
+
*/
|
|
1232
|
+
function createZInterstore(destination, keys, aggregationType) {
|
|
1233
|
+
const args = createZCmdArgs(keys, {
|
|
1234
|
+
aggregationType,
|
|
1235
|
+
withScores: false,
|
|
1236
|
+
destination,
|
|
1237
|
+
});
|
|
1238
|
+
return createCommand(RequestType.ZInterStore, args);
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* @internal
|
|
1242
|
+
*/
|
|
1243
|
+
function createZInter(keys, aggregationType, withScores) {
|
|
1244
|
+
const args = createZCmdArgs(keys, { aggregationType, withScores });
|
|
1245
|
+
return createCommand(RequestType.ZInter, args);
|
|
1246
|
+
}
|
|
1247
|
+
/**
|
|
1248
|
+
* @internal
|
|
1249
|
+
*/
|
|
1250
|
+
function createZUnion(keys, aggregationType, withScores) {
|
|
1251
|
+
const args = createZCmdArgs(keys, { aggregationType, withScores });
|
|
1252
|
+
return createCommand(RequestType.ZUnion, args);
|
|
1253
|
+
}
|
|
1254
|
+
/**
|
|
1255
|
+
* @internal
|
|
1256
|
+
* Helper function for Zcommands (ZInter, ZinterStore, ZUnion..) that arranges arguments in the server's required order.
|
|
1257
|
+
*/
|
|
1258
|
+
function createZCmdArgs(keys, options) {
|
|
1259
|
+
const args = [];
|
|
1260
|
+
const destination = options.destination;
|
|
1261
|
+
if (destination) {
|
|
1262
|
+
args.push(destination);
|
|
1263
|
+
}
|
|
1264
|
+
args.push(keys.length.toString());
|
|
1265
|
+
if (!Array.isArray(keys[0])) {
|
|
1266
|
+
// KeyWeight is an array
|
|
1267
|
+
args.push(...keys);
|
|
1268
|
+
}
|
|
1269
|
+
else {
|
|
1270
|
+
const weightsKeys = keys.map(([key]) => key);
|
|
1271
|
+
args.push(...weightsKeys);
|
|
1272
|
+
const weights = keys.map(([, weight]) => weight.toString());
|
|
1273
|
+
args.push("WEIGHTS", ...weights);
|
|
1274
|
+
}
|
|
1275
|
+
const aggregationType = options.aggregationType;
|
|
1276
|
+
if (aggregationType) {
|
|
1277
|
+
args.push("AGGREGATE", aggregationType);
|
|
1278
|
+
}
|
|
1279
|
+
if (options.withScores) {
|
|
1280
|
+
args.push("WITHSCORES");
|
|
1281
|
+
}
|
|
1282
|
+
return args;
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* @internal
|
|
1286
|
+
*/
|
|
1287
|
+
function createZRem(key, members) {
|
|
1288
|
+
return createCommand(RequestType.ZRem, [key].concat(members));
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* @internal
|
|
1292
|
+
*/
|
|
1293
|
+
function createZCard(key) {
|
|
1294
|
+
return createCommand(RequestType.ZCard, [key]);
|
|
1295
|
+
}
|
|
1296
|
+
/**
|
|
1297
|
+
* @internal
|
|
1298
|
+
*/
|
|
1299
|
+
function createZInterCard(keys, limit) {
|
|
1300
|
+
const args = keys;
|
|
1301
|
+
args.unshift(keys.length.toString());
|
|
1302
|
+
if (limit != undefined) {
|
|
1303
|
+
args.push("LIMIT", limit.toString());
|
|
1304
|
+
}
|
|
1305
|
+
return createCommand(RequestType.ZInterCard, args);
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* @internal
|
|
1309
|
+
*/
|
|
1310
|
+
function createZDiff(keys) {
|
|
1311
|
+
const args = keys;
|
|
1312
|
+
args.unshift(keys.length.toString());
|
|
1313
|
+
return createCommand(RequestType.ZDiff, args);
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* @internal
|
|
1317
|
+
*/
|
|
1318
|
+
function createZDiffWithScores(keys) {
|
|
1319
|
+
const args = keys;
|
|
1320
|
+
args.unshift(keys.length.toString());
|
|
1321
|
+
args.push("WITHSCORES");
|
|
1322
|
+
return createCommand(RequestType.ZDiff, args);
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* @internal
|
|
1326
|
+
*/
|
|
1327
|
+
function createZDiffStore(destination, keys) {
|
|
1328
|
+
const args = [destination, keys.length.toString(), ...keys];
|
|
1329
|
+
return createCommand(RequestType.ZDiffStore, args);
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* @internal
|
|
1333
|
+
*/
|
|
1334
|
+
function createZScore(key, member) {
|
|
1335
|
+
return createCommand(RequestType.ZScore, [key, member]);
|
|
1336
|
+
}
|
|
1337
|
+
/**
|
|
1338
|
+
* @internal
|
|
1339
|
+
*/
|
|
1340
|
+
function createZUnionStore(destination, keys, aggregationType) {
|
|
1341
|
+
const args = createZCmdArgs(keys, { destination, aggregationType });
|
|
1342
|
+
return createCommand(RequestType.ZUnionStore, args);
|
|
1343
|
+
}
|
|
1344
|
+
/**
|
|
1345
|
+
* @internal
|
|
1346
|
+
*/
|
|
1347
|
+
function createZMScore(key, members) {
|
|
1348
|
+
return createCommand(RequestType.ZMScore, [key, ...members]);
|
|
1349
|
+
}
|
|
1350
|
+
/**
|
|
1351
|
+
* @internal
|
|
1352
|
+
*/
|
|
1353
|
+
function createScan(cursor, options) {
|
|
1354
|
+
let args = [cursor];
|
|
1355
|
+
if (options) {
|
|
1356
|
+
args = args.concat(convertBaseScanOptionsToArgsArray(options));
|
|
1357
|
+
}
|
|
1358
|
+
if (options === null || options === void 0 ? void 0 : options.type) {
|
|
1359
|
+
args.push("TYPE", options.type);
|
|
1360
|
+
}
|
|
1361
|
+
return createCommand(RequestType.Scan, args);
|
|
1362
|
+
}
|
|
1363
|
+
var InfBoundary;
|
|
1364
|
+
(function (InfBoundary) {
|
|
1365
|
+
/**
|
|
1366
|
+
* Positive infinity bound.
|
|
1367
|
+
*/
|
|
1368
|
+
InfBoundary["PositiveInfinity"] = "+";
|
|
1369
|
+
/**
|
|
1370
|
+
* Negative infinity bound.
|
|
1371
|
+
*/
|
|
1372
|
+
InfBoundary["NegativeInfinity"] = "-";
|
|
1373
|
+
})(InfBoundary || (exports.InfBoundary = InfBoundary = {}));
|
|
1374
|
+
/** Returns a string representation of a score boundary as a command argument. */
|
|
1375
|
+
function getScoreBoundaryArg(score) {
|
|
1376
|
+
if (typeof score === "string") {
|
|
1377
|
+
// InfBoundary
|
|
1378
|
+
return score + "inf";
|
|
1379
|
+
}
|
|
1380
|
+
if (score.isInclusive == false) {
|
|
1381
|
+
return "(" + score.value.toString();
|
|
1382
|
+
}
|
|
1383
|
+
return score.value.toString();
|
|
1384
|
+
}
|
|
1385
|
+
/** Returns a string representation of a lex boundary as a command argument. */
|
|
1386
|
+
function getLexBoundaryArg(score) {
|
|
1387
|
+
if (typeof score === "string") {
|
|
1388
|
+
// InfBoundary
|
|
1389
|
+
return score;
|
|
1390
|
+
}
|
|
1391
|
+
if (score.isInclusive == false) {
|
|
1392
|
+
return typeof score.value === "string"
|
|
1393
|
+
? "(" + score.value
|
|
1394
|
+
: Buffer.concat([Buffer.from("("), score.value]);
|
|
1395
|
+
}
|
|
1396
|
+
return typeof score.value === "string"
|
|
1397
|
+
? "[" + score.value
|
|
1398
|
+
: Buffer.concat([Buffer.from("["), score.value]);
|
|
1399
|
+
}
|
|
1400
|
+
/** Returns a string representation of a stream boundary as a command argument. */
|
|
1401
|
+
function getStreamBoundaryArg(boundary) {
|
|
1402
|
+
if (typeof boundary === "string") {
|
|
1403
|
+
// InfBoundary
|
|
1404
|
+
return boundary;
|
|
1405
|
+
}
|
|
1406
|
+
if (boundary.isInclusive == false) {
|
|
1407
|
+
return "(" + boundary.value.toString();
|
|
1408
|
+
}
|
|
1409
|
+
return boundary.value.toString();
|
|
1410
|
+
}
|
|
1411
|
+
function createZRangeArgs(key, rangeQuery, reverse, withScores) {
|
|
1412
|
+
const args = [key];
|
|
1413
|
+
if (typeof rangeQuery.start != "number") {
|
|
1414
|
+
rangeQuery = rangeQuery;
|
|
1415
|
+
if (rangeQuery.type == "byLex") {
|
|
1416
|
+
args.push(getLexBoundaryArg(rangeQuery.start), getLexBoundaryArg(rangeQuery.end), "BYLEX");
|
|
1417
|
+
}
|
|
1418
|
+
else {
|
|
1419
|
+
args.push(getScoreBoundaryArg(rangeQuery.start), getScoreBoundaryArg(rangeQuery.end), "BYSCORE");
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
else {
|
|
1423
|
+
args.push(rangeQuery.start.toString());
|
|
1424
|
+
args.push(rangeQuery.end.toString());
|
|
1425
|
+
}
|
|
1426
|
+
if (reverse) {
|
|
1427
|
+
args.push("REV");
|
|
1428
|
+
}
|
|
1429
|
+
if ("limit" in rangeQuery && rangeQuery.limit !== undefined) {
|
|
1430
|
+
args.push("LIMIT", String(rangeQuery.limit.offset), String(rangeQuery.limit.count));
|
|
1431
|
+
}
|
|
1432
|
+
if (withScores) {
|
|
1433
|
+
args.push("WITHSCORES");
|
|
1434
|
+
}
|
|
1435
|
+
return args;
|
|
1436
|
+
}
|
|
1437
|
+
/**
|
|
1438
|
+
* @internal
|
|
1439
|
+
*/
|
|
1440
|
+
function createZCount(key, minScore, maxScore) {
|
|
1441
|
+
const args = [
|
|
1442
|
+
key,
|
|
1443
|
+
getScoreBoundaryArg(minScore),
|
|
1444
|
+
getScoreBoundaryArg(maxScore),
|
|
1445
|
+
];
|
|
1446
|
+
return createCommand(RequestType.ZCount, args);
|
|
1447
|
+
}
|
|
1448
|
+
/**
|
|
1449
|
+
* @internal
|
|
1450
|
+
*/
|
|
1451
|
+
function createZRange(key, rangeQuery, reverse = false) {
|
|
1452
|
+
const args = createZRangeArgs(key, rangeQuery, reverse, false);
|
|
1453
|
+
return createCommand(RequestType.ZRange, args);
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* @internal
|
|
1457
|
+
*/
|
|
1458
|
+
function createZRangeWithScores(key, rangeQuery, reverse = false) {
|
|
1459
|
+
const args = createZRangeArgs(key, rangeQuery, reverse, true);
|
|
1460
|
+
return createCommand(RequestType.ZRange, args);
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* @internal
|
|
1464
|
+
*/
|
|
1465
|
+
function createZRangeStore(destination, source, rangeQuery, reverse = false) {
|
|
1466
|
+
const args = [
|
|
1467
|
+
destination,
|
|
1468
|
+
...createZRangeArgs(source, rangeQuery, reverse, false),
|
|
1469
|
+
];
|
|
1470
|
+
return createCommand(RequestType.ZRangeStore, args);
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* @internal
|
|
1474
|
+
*/
|
|
1475
|
+
function createType(key) {
|
|
1476
|
+
return createCommand(RequestType.Type, [key]);
|
|
1477
|
+
}
|
|
1478
|
+
/**
|
|
1479
|
+
* @internal
|
|
1480
|
+
*/
|
|
1481
|
+
function createStrlen(key) {
|
|
1482
|
+
return createCommand(RequestType.Strlen, [key]);
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* @internal
|
|
1486
|
+
*/
|
|
1487
|
+
function createLIndex(key, index) {
|
|
1488
|
+
return createCommand(RequestType.LIndex, [key, index.toString()]);
|
|
1489
|
+
}
|
|
1490
|
+
/**
|
|
1491
|
+
* Defines where to insert new elements into a list.
|
|
1492
|
+
*/
|
|
1493
|
+
var InsertPosition;
|
|
1494
|
+
(function (InsertPosition) {
|
|
1495
|
+
/**
|
|
1496
|
+
* Insert new element before the pivot.
|
|
1497
|
+
*/
|
|
1498
|
+
InsertPosition["Before"] = "before";
|
|
1499
|
+
/**
|
|
1500
|
+
* Insert new element after the pivot.
|
|
1501
|
+
*/
|
|
1502
|
+
InsertPosition["After"] = "after";
|
|
1503
|
+
})(InsertPosition || (exports.InsertPosition = InsertPosition = {}));
|
|
1504
|
+
/**
|
|
1505
|
+
* @internal
|
|
1506
|
+
*/
|
|
1507
|
+
function createLInsert(key, position, pivot, element) {
|
|
1508
|
+
return createCommand(RequestType.LInsert, [key, position, pivot, element]);
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* @internal
|
|
1512
|
+
*/
|
|
1513
|
+
function createZPopMin(key, count) {
|
|
1514
|
+
const args = count == undefined ? [key] : [key, count.toString()];
|
|
1515
|
+
return createCommand(RequestType.ZPopMin, args);
|
|
1516
|
+
}
|
|
1517
|
+
/**
|
|
1518
|
+
* @internal
|
|
1519
|
+
*/
|
|
1520
|
+
function createZPopMax(key, count) {
|
|
1521
|
+
const args = count == undefined ? [key] : [key, count.toString()];
|
|
1522
|
+
return createCommand(RequestType.ZPopMax, args);
|
|
1523
|
+
}
|
|
1524
|
+
/**
|
|
1525
|
+
* @internal
|
|
1526
|
+
*/
|
|
1527
|
+
function createEcho(message) {
|
|
1528
|
+
return createCommand(RequestType.Echo, [message]);
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* @internal
|
|
1532
|
+
*/
|
|
1533
|
+
function createPTTL(key) {
|
|
1534
|
+
return createCommand(RequestType.PTTL, [key]);
|
|
1535
|
+
}
|
|
1536
|
+
/**
|
|
1537
|
+
* @internal
|
|
1538
|
+
*/
|
|
1539
|
+
function createZRemRangeByRank(key, start, end) {
|
|
1540
|
+
return createCommand(RequestType.ZRemRangeByRank, [
|
|
1541
|
+
key,
|
|
1542
|
+
start.toString(),
|
|
1543
|
+
end.toString(),
|
|
1544
|
+
]);
|
|
1545
|
+
}
|
|
1546
|
+
/**
|
|
1547
|
+
* @internal
|
|
1548
|
+
*/
|
|
1549
|
+
function createZRemRangeByLex(key, minLex, maxLex) {
|
|
1550
|
+
const args = [key, getLexBoundaryArg(minLex), getLexBoundaryArg(maxLex)];
|
|
1551
|
+
return createCommand(RequestType.ZRemRangeByLex, args);
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* @internal
|
|
1555
|
+
*/
|
|
1556
|
+
function createZRemRangeByScore(key, minScore, maxScore) {
|
|
1557
|
+
const args = [
|
|
1558
|
+
key,
|
|
1559
|
+
getScoreBoundaryArg(minScore),
|
|
1560
|
+
getScoreBoundaryArg(maxScore),
|
|
1561
|
+
];
|
|
1562
|
+
return createCommand(RequestType.ZRemRangeByScore, args);
|
|
1563
|
+
}
|
|
1564
|
+
/** @internal */
|
|
1565
|
+
function createPersist(key) {
|
|
1566
|
+
return createCommand(RequestType.Persist, [key]);
|
|
1567
|
+
}
|
|
1568
|
+
/**
|
|
1569
|
+
* @internal
|
|
1570
|
+
*/
|
|
1571
|
+
function createZLexCount(key, minLex, maxLex) {
|
|
1572
|
+
const args = [key, getLexBoundaryArg(minLex), getLexBoundaryArg(maxLex)];
|
|
1573
|
+
return createCommand(RequestType.ZLexCount, args);
|
|
1574
|
+
}
|
|
1575
|
+
/** @internal */
|
|
1576
|
+
function createZRank(key, member, withScores) {
|
|
1577
|
+
const args = [key, member];
|
|
1578
|
+
if (withScores) {
|
|
1579
|
+
args.push("WITHSCORE");
|
|
1580
|
+
}
|
|
1581
|
+
return createCommand(RequestType.ZRank, args);
|
|
1582
|
+
}
|
|
1583
|
+
function addTrimOptions(options, args) {
|
|
1584
|
+
if (options.method === "maxlen") {
|
|
1585
|
+
args.push("MAXLEN");
|
|
1586
|
+
}
|
|
1587
|
+
else if (options.method === "minid") {
|
|
1588
|
+
args.push("MINID");
|
|
1589
|
+
}
|
|
1590
|
+
if (options.exact) {
|
|
1591
|
+
args.push("=");
|
|
1592
|
+
}
|
|
1593
|
+
else {
|
|
1594
|
+
args.push("~");
|
|
1595
|
+
}
|
|
1596
|
+
if (options.method === "maxlen") {
|
|
1597
|
+
args.push(options.threshold.toString());
|
|
1598
|
+
}
|
|
1599
|
+
else if (options.method === "minid") {
|
|
1600
|
+
args.push(options.threshold);
|
|
1601
|
+
}
|
|
1602
|
+
if (options.limit) {
|
|
1603
|
+
args.push("LIMIT");
|
|
1604
|
+
args.push(options.limit.toString());
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
/**
|
|
1608
|
+
* @internal
|
|
1609
|
+
*/
|
|
1610
|
+
function createXAdd(key, values, options) {
|
|
1611
|
+
const args = [key];
|
|
1612
|
+
if ((options === null || options === void 0 ? void 0 : options.makeStream) === false) {
|
|
1613
|
+
args.push("NOMKSTREAM");
|
|
1614
|
+
}
|
|
1615
|
+
if (options === null || options === void 0 ? void 0 : options.trim) {
|
|
1616
|
+
addTrimOptions(options.trim, args);
|
|
1617
|
+
}
|
|
1618
|
+
if (options === null || options === void 0 ? void 0 : options.id) {
|
|
1619
|
+
args.push(options.id);
|
|
1620
|
+
}
|
|
1621
|
+
else {
|
|
1622
|
+
args.push("*");
|
|
1623
|
+
}
|
|
1624
|
+
values.forEach(([field, value]) => {
|
|
1625
|
+
args.push(field);
|
|
1626
|
+
args.push(value);
|
|
1627
|
+
});
|
|
1628
|
+
return createCommand(RequestType.XAdd, args);
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* @internal
|
|
1632
|
+
*/
|
|
1633
|
+
function createXDel(key, ids) {
|
|
1634
|
+
return createCommand(RequestType.XDel, [key, ...ids]);
|
|
1635
|
+
}
|
|
1636
|
+
/**
|
|
1637
|
+
* @internal
|
|
1638
|
+
*/
|
|
1639
|
+
function createXTrim(key, options) {
|
|
1640
|
+
const args = [key];
|
|
1641
|
+
addTrimOptions(options, args);
|
|
1642
|
+
return createCommand(RequestType.XTrim, args);
|
|
1643
|
+
}
|
|
1644
|
+
/**
|
|
1645
|
+
* @internal
|
|
1646
|
+
*/
|
|
1647
|
+
function createXRange(key, start, end, count) {
|
|
1648
|
+
const args = [key, getStreamBoundaryArg(start), getStreamBoundaryArg(end)];
|
|
1649
|
+
if (count !== undefined) {
|
|
1650
|
+
args.push("COUNT");
|
|
1651
|
+
args.push(count.toString());
|
|
1652
|
+
}
|
|
1653
|
+
return createCommand(RequestType.XRange, args);
|
|
1654
|
+
}
|
|
1655
|
+
/**
|
|
1656
|
+
* @internal
|
|
1657
|
+
*/
|
|
1658
|
+
function createXRevRange(key, start, end, count) {
|
|
1659
|
+
const args = [key, getStreamBoundaryArg(start), getStreamBoundaryArg(end)];
|
|
1660
|
+
if (count !== undefined) {
|
|
1661
|
+
args.push("COUNT");
|
|
1662
|
+
args.push(count.toString());
|
|
1663
|
+
}
|
|
1664
|
+
return createCommand(RequestType.XRevRange, args);
|
|
1665
|
+
}
|
|
1666
|
+
/**
|
|
1667
|
+
* @internal
|
|
1668
|
+
*/
|
|
1669
|
+
function createXGroupCreateConsumer(key, groupName, consumerName) {
|
|
1670
|
+
return createCommand(RequestType.XGroupCreateConsumer, [
|
|
1671
|
+
key,
|
|
1672
|
+
groupName,
|
|
1673
|
+
consumerName,
|
|
1674
|
+
]);
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* @internal
|
|
1678
|
+
*/
|
|
1679
|
+
function createXGroupDelConsumer(key, groupName, consumerName) {
|
|
1680
|
+
return createCommand(RequestType.XGroupDelConsumer, [
|
|
1681
|
+
key,
|
|
1682
|
+
groupName,
|
|
1683
|
+
consumerName,
|
|
1684
|
+
]);
|
|
1685
|
+
}
|
|
1686
|
+
/**
|
|
1687
|
+
* @internal
|
|
1688
|
+
*/
|
|
1689
|
+
function createTime() {
|
|
1690
|
+
return createCommand(RequestType.Time, []);
|
|
1691
|
+
}
|
|
1692
|
+
/**
|
|
1693
|
+
* @internal
|
|
1694
|
+
*/
|
|
1695
|
+
function createPublish(message, channel, sharded = false) {
|
|
1696
|
+
const request = sharded ? RequestType.SPublish : RequestType.Publish;
|
|
1697
|
+
return createCommand(request, [channel, message]);
|
|
1698
|
+
}
|
|
1699
|
+
/**
|
|
1700
|
+
* @internal
|
|
1701
|
+
*/
|
|
1702
|
+
function createBRPop(keys, timeout) {
|
|
1703
|
+
const args = [...keys, timeout.toString()];
|
|
1704
|
+
return createCommand(RequestType.BRPop, args);
|
|
1705
|
+
}
|
|
1706
|
+
/**
|
|
1707
|
+
* @internal
|
|
1708
|
+
*/
|
|
1709
|
+
function createBLPop(keys, timeout) {
|
|
1710
|
+
const args = [...keys, timeout.toString()];
|
|
1711
|
+
return createCommand(RequestType.BLPop, args);
|
|
1712
|
+
}
|
|
1713
|
+
/**
|
|
1714
|
+
* @internal
|
|
1715
|
+
*/
|
|
1716
|
+
function createFCall(func, keys, args) {
|
|
1717
|
+
const params = [
|
|
1718
|
+
func,
|
|
1719
|
+
keys.length.toString(),
|
|
1720
|
+
...keys,
|
|
1721
|
+
...args,
|
|
1722
|
+
];
|
|
1723
|
+
return createCommand(RequestType.FCall, params);
|
|
1724
|
+
}
|
|
1725
|
+
/**
|
|
1726
|
+
* @internal
|
|
1727
|
+
*/
|
|
1728
|
+
function createFCallReadOnly(func, keys, args) {
|
|
1729
|
+
const params = [
|
|
1730
|
+
func,
|
|
1731
|
+
keys.length.toString(),
|
|
1732
|
+
...keys,
|
|
1733
|
+
...args,
|
|
1734
|
+
];
|
|
1735
|
+
return createCommand(RequestType.FCallReadOnly, params);
|
|
1736
|
+
}
|
|
1737
|
+
/**
|
|
1738
|
+
* @internal
|
|
1739
|
+
*/
|
|
1740
|
+
function createFunctionDelete(libraryCode) {
|
|
1741
|
+
return createCommand(RequestType.FunctionDelete, [libraryCode]);
|
|
1742
|
+
}
|
|
1743
|
+
/**
|
|
1744
|
+
* @internal
|
|
1745
|
+
*/
|
|
1746
|
+
function createFunctionFlush(mode) {
|
|
1747
|
+
if (mode) {
|
|
1748
|
+
return createCommand(RequestType.FunctionFlush, [mode.toString()]);
|
|
1749
|
+
}
|
|
1750
|
+
else {
|
|
1751
|
+
return createCommand(RequestType.FunctionFlush, []);
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
/**
|
|
1755
|
+
* @internal
|
|
1756
|
+
*/
|
|
1757
|
+
function createFunctionLoad(libraryCode, replace) {
|
|
1758
|
+
const args = replace ? ["REPLACE", libraryCode] : [libraryCode];
|
|
1759
|
+
return createCommand(RequestType.FunctionLoad, args);
|
|
1760
|
+
}
|
|
1761
|
+
/**
|
|
1762
|
+
* @internal
|
|
1763
|
+
*/
|
|
1764
|
+
function createFunctionList(options) {
|
|
1765
|
+
const args = [];
|
|
1766
|
+
if (options) {
|
|
1767
|
+
if (options.libNamePattern) {
|
|
1768
|
+
args.push("LIBRARYNAME", options.libNamePattern);
|
|
1769
|
+
}
|
|
1770
|
+
if (options.withCode) {
|
|
1771
|
+
args.push("WITHCODE");
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
return createCommand(RequestType.FunctionList, args);
|
|
1775
|
+
}
|
|
1776
|
+
/** @internal */
|
|
1777
|
+
function createFunctionStats() {
|
|
1778
|
+
return createCommand(RequestType.FunctionStats, []);
|
|
1779
|
+
}
|
|
1780
|
+
/** @internal */
|
|
1781
|
+
function createFunctionKill() {
|
|
1782
|
+
return createCommand(RequestType.FunctionKill, []);
|
|
1783
|
+
}
|
|
1784
|
+
/** @internal */
|
|
1785
|
+
function createFunctionDump() {
|
|
1786
|
+
return createCommand(RequestType.FunctionDump, []);
|
|
1787
|
+
}
|
|
1788
|
+
/**
|
|
1789
|
+
* Option for `FUNCTION RESTORE` command: {@link GlideClient.functionRestore} and
|
|
1790
|
+
* {@link GlideClusterClient.functionRestore}.
|
|
1791
|
+
*
|
|
1792
|
+
* @see {@link https://valkey.io/commands/function-restore/"|valkey.io} for more details.
|
|
1793
|
+
*/
|
|
1794
|
+
var FunctionRestorePolicy;
|
|
1795
|
+
(function (FunctionRestorePolicy) {
|
|
1796
|
+
/**
|
|
1797
|
+
* Appends the restored libraries to the existing libraries and aborts on collision. This is the
|
|
1798
|
+
* default policy.
|
|
1799
|
+
*/
|
|
1800
|
+
FunctionRestorePolicy["APPEND"] = "APPEND";
|
|
1801
|
+
/** Deletes all existing libraries before restoring the payload. */
|
|
1802
|
+
FunctionRestorePolicy["FLUSH"] = "FLUSH";
|
|
1803
|
+
/**
|
|
1804
|
+
* Appends the restored libraries to the existing libraries, replacing any existing ones in case
|
|
1805
|
+
* of name collisions. Note that this policy doesn't prevent function name collisions, only
|
|
1806
|
+
* libraries.
|
|
1807
|
+
*/
|
|
1808
|
+
FunctionRestorePolicy["REPLACE"] = "REPLACE";
|
|
1809
|
+
})(FunctionRestorePolicy || (exports.FunctionRestorePolicy = FunctionRestorePolicy = {}));
|
|
1810
|
+
/** @internal */
|
|
1811
|
+
function createFunctionRestore(data, policy) {
|
|
1812
|
+
return createCommand(RequestType.FunctionRestore, policy ? [data, policy] : [data]);
|
|
1813
|
+
}
|
|
1814
|
+
/**
|
|
1815
|
+
* @internal
|
|
1816
|
+
*/
|
|
1817
|
+
function createBitCount(key, options) {
|
|
1818
|
+
const args = [key];
|
|
1819
|
+
if (options) {
|
|
1820
|
+
args.push(options.start.toString());
|
|
1821
|
+
if (options.end !== undefined)
|
|
1822
|
+
args.push(options.end.toString());
|
|
1823
|
+
if (options.indexType)
|
|
1824
|
+
args.push(options.indexType);
|
|
1825
|
+
}
|
|
1826
|
+
return createCommand(RequestType.BitCount, args);
|
|
1827
|
+
}
|
|
1828
|
+
/**
|
|
1829
|
+
* Enumeration specifying if index arguments are BYTE indexes or BIT indexes.
|
|
1830
|
+
* Can be specified in {@link BitOffsetOptions}, which is an optional argument to the {@link BaseClient.bitcount|bitcount} command.
|
|
1831
|
+
* Can also be specified as an optional argument to the {@link BaseClient.bitposInverval|bitposInterval} command.
|
|
1832
|
+
*
|
|
1833
|
+
* since - Valkey version 7.0.0.
|
|
1834
|
+
*/
|
|
1835
|
+
var BitmapIndexType;
|
|
1836
|
+
(function (BitmapIndexType) {
|
|
1837
|
+
/** Specifies that provided indexes are byte indexes. */
|
|
1838
|
+
BitmapIndexType["BYTE"] = "BYTE";
|
|
1839
|
+
/** Specifies that provided indexes are bit indexes. */
|
|
1840
|
+
BitmapIndexType["BIT"] = "BIT";
|
|
1841
|
+
})(BitmapIndexType || (exports.BitmapIndexType = BitmapIndexType = {}));
|
|
1842
|
+
/**
|
|
1843
|
+
* @internal
|
|
1844
|
+
*/
|
|
1845
|
+
function createBitPos(key, bit, start, end, indexType) {
|
|
1846
|
+
const args = [key, bit.toString()];
|
|
1847
|
+
if (start !== undefined) {
|
|
1848
|
+
args.push(start.toString());
|
|
1849
|
+
}
|
|
1850
|
+
if (end !== undefined) {
|
|
1851
|
+
args.push(end.toString());
|
|
1852
|
+
}
|
|
1853
|
+
if (indexType) {
|
|
1854
|
+
args.push(indexType);
|
|
1855
|
+
}
|
|
1856
|
+
return createCommand(RequestType.BitPos, args);
|
|
1857
|
+
}
|
|
1858
|
+
/**
|
|
1859
|
+
* Defines flushing mode for {@link GlideClient.flushall}, {@link GlideClusterClient.flushall},
|
|
1860
|
+
* {@link GlideClient.functionFlush}, {@link GlideClusterClient.functionFlush},
|
|
1861
|
+
* {@link GlideClient.flushdb} and {@link GlideClusterClient.flushdb} commands.
|
|
1862
|
+
*
|
|
1863
|
+
* See https://valkey.io/commands/flushall/ and https://valkey.io/commands/flushdb/ for details.
|
|
1864
|
+
*/
|
|
1865
|
+
var FlushMode;
|
|
1866
|
+
(function (FlushMode) {
|
|
1867
|
+
/**
|
|
1868
|
+
* Flushes synchronously.
|
|
1869
|
+
*
|
|
1870
|
+
* since Valkey version 6.2.0.
|
|
1871
|
+
*/
|
|
1872
|
+
FlushMode["SYNC"] = "SYNC";
|
|
1873
|
+
/** Flushes asynchronously. */
|
|
1874
|
+
FlushMode["ASYNC"] = "ASYNC";
|
|
1875
|
+
})(FlushMode || (exports.FlushMode = FlushMode = {}));
|
|
1876
|
+
/**
|
|
1877
|
+
* @internal
|
|
1878
|
+
* This function converts an input from Record or GlideRecord types to GlideRecord.
|
|
1879
|
+
*
|
|
1880
|
+
* @param record - input record in either Record or GlideRecord types.
|
|
1881
|
+
* @returns same data in GlideRecord type.
|
|
1882
|
+
*/
|
|
1883
|
+
function convertKeysAndEntries(record) {
|
|
1884
|
+
if (!Array.isArray(record)) {
|
|
1885
|
+
return (0, BaseClient_1.convertRecordToGlideRecord)(record);
|
|
1886
|
+
}
|
|
1887
|
+
return record;
|
|
1888
|
+
}
|
|
1889
|
+
/** @internal */
|
|
1890
|
+
function addReadOptions(options) {
|
|
1891
|
+
const args = [];
|
|
1892
|
+
if ((options === null || options === void 0 ? void 0 : options.count) !== undefined) {
|
|
1893
|
+
args.push("COUNT");
|
|
1894
|
+
args.push(options.count.toString());
|
|
1895
|
+
}
|
|
1896
|
+
if ((options === null || options === void 0 ? void 0 : options.block) !== undefined) {
|
|
1897
|
+
args.push("BLOCK");
|
|
1898
|
+
args.push(options.block.toString());
|
|
1899
|
+
}
|
|
1900
|
+
return args;
|
|
1901
|
+
}
|
|
1902
|
+
/** @internal */
|
|
1903
|
+
function addStreamsArgs(keys_and_ids) {
|
|
1904
|
+
return [
|
|
1905
|
+
"STREAMS",
|
|
1906
|
+
...keys_and_ids.map((e) => e.key),
|
|
1907
|
+
...keys_and_ids.map((e) => e.value),
|
|
1908
|
+
];
|
|
1909
|
+
}
|
|
1910
|
+
/**
|
|
1911
|
+
* @internal
|
|
1912
|
+
*/
|
|
1913
|
+
function createXRead(keys_and_ids, options) {
|
|
1914
|
+
const args = addReadOptions(options);
|
|
1915
|
+
args.push(...addStreamsArgs(keys_and_ids));
|
|
1916
|
+
return createCommand(RequestType.XRead, args);
|
|
1917
|
+
}
|
|
1918
|
+
/** @internal */
|
|
1919
|
+
function createXReadGroup(group, consumer, keys_and_ids, options) {
|
|
1920
|
+
const args = ["GROUP", group, consumer];
|
|
1921
|
+
if (options) {
|
|
1922
|
+
args.push(...addReadOptions(options));
|
|
1923
|
+
if (options.noAck)
|
|
1924
|
+
args.push("NOACK");
|
|
1925
|
+
}
|
|
1926
|
+
args.push(...addStreamsArgs(keys_and_ids));
|
|
1927
|
+
return createCommand(RequestType.XReadGroup, args);
|
|
1928
|
+
}
|
|
1929
|
+
/**
|
|
1930
|
+
* @internal
|
|
1931
|
+
*/
|
|
1932
|
+
function createXInfoStream(key, options) {
|
|
1933
|
+
const args = [key];
|
|
1934
|
+
if (options != false) {
|
|
1935
|
+
args.push("FULL");
|
|
1936
|
+
if (typeof options === "number") {
|
|
1937
|
+
args.push("COUNT");
|
|
1938
|
+
args.push(options.toString());
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
return createCommand(RequestType.XInfoStream, args);
|
|
1942
|
+
}
|
|
1943
|
+
/** @internal */
|
|
1944
|
+
function createXInfoGroups(key) {
|
|
1945
|
+
return createCommand(RequestType.XInfoGroups, [key]);
|
|
1946
|
+
}
|
|
1947
|
+
/**
|
|
1948
|
+
* @internal
|
|
1949
|
+
*/
|
|
1950
|
+
function createXLen(key) {
|
|
1951
|
+
return createCommand(RequestType.XLen, [key]);
|
|
1952
|
+
}
|
|
1953
|
+
/** @internal */
|
|
1954
|
+
function createXPending(key, group, options) {
|
|
1955
|
+
const args = [key, group];
|
|
1956
|
+
if (options) {
|
|
1957
|
+
if (options.minIdleTime !== undefined)
|
|
1958
|
+
args.push("IDLE", options.minIdleTime.toString());
|
|
1959
|
+
args.push(getStreamBoundaryArg(options.start), getStreamBoundaryArg(options.end), options.count.toString());
|
|
1960
|
+
if (options.consumer)
|
|
1961
|
+
args.push(options.consumer);
|
|
1962
|
+
}
|
|
1963
|
+
return createCommand(RequestType.XPending, args);
|
|
1964
|
+
}
|
|
1965
|
+
/** @internal */
|
|
1966
|
+
function createXInfoConsumers(key, group) {
|
|
1967
|
+
return createCommand(RequestType.XInfoConsumers, [key, group]);
|
|
1968
|
+
}
|
|
1969
|
+
/** @internal */
|
|
1970
|
+
function createXClaim(key, group, consumer, minIdleTime, ids, options, justId) {
|
|
1971
|
+
const args = [key, group, consumer, minIdleTime.toString(), ...ids];
|
|
1972
|
+
if (options) {
|
|
1973
|
+
if (options.idle !== undefined)
|
|
1974
|
+
args.push("IDLE", options.idle.toString());
|
|
1975
|
+
if (options.idleUnixTime !== undefined)
|
|
1976
|
+
args.push("TIME", options.idleUnixTime.toString());
|
|
1977
|
+
if (options.retryCount !== undefined)
|
|
1978
|
+
args.push("RETRYCOUNT", options.retryCount.toString());
|
|
1979
|
+
if (options.isForce)
|
|
1980
|
+
args.push("FORCE");
|
|
1981
|
+
}
|
|
1982
|
+
if (justId)
|
|
1983
|
+
args.push("JUSTID");
|
|
1984
|
+
return createCommand(RequestType.XClaim, args);
|
|
1985
|
+
}
|
|
1986
|
+
/** @internal */
|
|
1987
|
+
function createXAutoClaim(key, group, consumer, minIdleTime, start, count, justId) {
|
|
1988
|
+
const args = [
|
|
1989
|
+
key,
|
|
1990
|
+
group,
|
|
1991
|
+
consumer,
|
|
1992
|
+
minIdleTime.toString(),
|
|
1993
|
+
start.toString(),
|
|
1994
|
+
];
|
|
1995
|
+
if (count !== undefined)
|
|
1996
|
+
args.push("COUNT", count.toString());
|
|
1997
|
+
if (justId)
|
|
1998
|
+
args.push("JUSTID");
|
|
1999
|
+
return createCommand(RequestType.XAutoClaim, args);
|
|
2000
|
+
}
|
|
2001
|
+
/**
|
|
2002
|
+
* @internal
|
|
2003
|
+
*/
|
|
2004
|
+
function createXGroupCreate(key, groupName, id, options) {
|
|
2005
|
+
const args = [key, groupName, id];
|
|
2006
|
+
if (options) {
|
|
2007
|
+
if (options.mkStream) {
|
|
2008
|
+
args.push("MKSTREAM");
|
|
2009
|
+
}
|
|
2010
|
+
if (options.entriesRead) {
|
|
2011
|
+
args.push("ENTRIESREAD");
|
|
2012
|
+
args.push(options.entriesRead);
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
return createCommand(RequestType.XGroupCreate, args);
|
|
2016
|
+
}
|
|
2017
|
+
/**
|
|
2018
|
+
* @internal
|
|
2019
|
+
*/
|
|
2020
|
+
function createXGroupDestroy(key, groupName) {
|
|
2021
|
+
return createCommand(RequestType.XGroupDestroy, [key, groupName]);
|
|
2022
|
+
}
|
|
2023
|
+
/**
|
|
2024
|
+
* @internal
|
|
2025
|
+
*/
|
|
2026
|
+
function createRename(key, newKey) {
|
|
2027
|
+
return createCommand(RequestType.Rename, [key, newKey]);
|
|
2028
|
+
}
|
|
2029
|
+
/**
|
|
2030
|
+
* @internal
|
|
2031
|
+
*/
|
|
2032
|
+
function createRenameNX(key, newKey) {
|
|
2033
|
+
return createCommand(RequestType.RenameNX, [key, newKey]);
|
|
2034
|
+
}
|
|
2035
|
+
/**
|
|
2036
|
+
* @internal
|
|
2037
|
+
*/
|
|
2038
|
+
function createPfAdd(key, elements) {
|
|
2039
|
+
const args = [key, ...elements];
|
|
2040
|
+
return createCommand(RequestType.PfAdd, args);
|
|
2041
|
+
}
|
|
2042
|
+
/**
|
|
2043
|
+
* @internal
|
|
2044
|
+
*/
|
|
2045
|
+
function createPfCount(keys) {
|
|
2046
|
+
return createCommand(RequestType.PfCount, keys);
|
|
2047
|
+
}
|
|
2048
|
+
/**
|
|
2049
|
+
* @internal
|
|
2050
|
+
*/
|
|
2051
|
+
function createPfMerge(destination, sourceKey) {
|
|
2052
|
+
return createCommand(RequestType.PfMerge, [destination, ...sourceKey]);
|
|
2053
|
+
}
|
|
2054
|
+
/**
|
|
2055
|
+
* @internal
|
|
2056
|
+
*/
|
|
2057
|
+
function createObjectEncoding(key) {
|
|
2058
|
+
return createCommand(RequestType.ObjectEncoding, [key]);
|
|
2059
|
+
}
|
|
2060
|
+
/**
|
|
2061
|
+
* @internal
|
|
2062
|
+
*/
|
|
2063
|
+
function createObjectFreq(key) {
|
|
2064
|
+
return createCommand(RequestType.ObjectFreq, [key]);
|
|
2065
|
+
}
|
|
2066
|
+
/**
|
|
2067
|
+
* @internal
|
|
2068
|
+
*/
|
|
2069
|
+
function createObjectIdletime(key) {
|
|
2070
|
+
return createCommand(RequestType.ObjectIdleTime, [key]);
|
|
2071
|
+
}
|
|
2072
|
+
/**
|
|
2073
|
+
* @internal
|
|
2074
|
+
*/
|
|
2075
|
+
function createObjectRefcount(key) {
|
|
2076
|
+
return createCommand(RequestType.ObjectRefCount, [key]);
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* @internal
|
|
2080
|
+
*/
|
|
2081
|
+
function createLolwut(options) {
|
|
2082
|
+
const args = [];
|
|
2083
|
+
if (options) {
|
|
2084
|
+
if (options.version !== undefined) {
|
|
2085
|
+
args.push("VERSION", options.version.toString());
|
|
2086
|
+
}
|
|
2087
|
+
if (options.parameters !== undefined) {
|
|
2088
|
+
args.push(...options.parameters.map((param) => param.toString()));
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
return createCommand(RequestType.Lolwut, args);
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* @internal
|
|
2095
|
+
*/
|
|
2096
|
+
function createFlushAll(mode) {
|
|
2097
|
+
if (mode) {
|
|
2098
|
+
return createCommand(RequestType.FlushAll, [mode.toString()]);
|
|
2099
|
+
}
|
|
2100
|
+
else {
|
|
2101
|
+
return createCommand(RequestType.FlushAll, []);
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
/**
|
|
2105
|
+
* @internal
|
|
2106
|
+
*/
|
|
2107
|
+
function createFlushDB(mode) {
|
|
2108
|
+
if (mode) {
|
|
2109
|
+
return createCommand(RequestType.FlushDB, [mode.toString()]);
|
|
2110
|
+
}
|
|
2111
|
+
else {
|
|
2112
|
+
return createCommand(RequestType.FlushDB, []);
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
/**
|
|
2116
|
+
* @internal
|
|
2117
|
+
*/
|
|
2118
|
+
function createCopy(source, destination, options) {
|
|
2119
|
+
let args = [source, destination];
|
|
2120
|
+
if (options) {
|
|
2121
|
+
if (options.destinationDB !== undefined) {
|
|
2122
|
+
args = args.concat("DB", options.destinationDB.toString());
|
|
2123
|
+
}
|
|
2124
|
+
if (options.replace) {
|
|
2125
|
+
args.push("REPLACE");
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
return createCommand(RequestType.Copy, args);
|
|
2129
|
+
}
|
|
2130
|
+
/**
|
|
2131
|
+
* @internal
|
|
2132
|
+
*/
|
|
2133
|
+
function createMove(key, dbIndex) {
|
|
2134
|
+
return createCommand(RequestType.Move, [key, dbIndex.toString()]);
|
|
2135
|
+
}
|
|
2136
|
+
/**
|
|
2137
|
+
* @internal
|
|
2138
|
+
*/
|
|
2139
|
+
function createDump(key) {
|
|
2140
|
+
return createCommand(RequestType.Dump, [key]);
|
|
2141
|
+
}
|
|
2142
|
+
/**
|
|
2143
|
+
* @internal
|
|
2144
|
+
*/
|
|
2145
|
+
function createRestore(key, ttl, value, options) {
|
|
2146
|
+
const args = [key, ttl.toString(), value];
|
|
2147
|
+
if (options) {
|
|
2148
|
+
if (options.idletime !== undefined && options.frequency !== undefined) {
|
|
2149
|
+
throw new Error(`syntax error: both IDLETIME and FREQ cannot be set at the same time.`);
|
|
2150
|
+
}
|
|
2151
|
+
if (options.replace) {
|
|
2152
|
+
args.push("REPLACE");
|
|
2153
|
+
}
|
|
2154
|
+
if (options.absttl) {
|
|
2155
|
+
args.push("ABSTTL");
|
|
2156
|
+
}
|
|
2157
|
+
if (options.idletime !== undefined) {
|
|
2158
|
+
args.push("IDLETIME", options.idletime.toString());
|
|
2159
|
+
}
|
|
2160
|
+
if (options.frequency !== undefined) {
|
|
2161
|
+
args.push("FREQ", options.frequency.toString());
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2164
|
+
return createCommand(RequestType.Restore, args);
|
|
2165
|
+
}
|
|
2166
|
+
/**
|
|
2167
|
+
* @internal
|
|
2168
|
+
*/
|
|
2169
|
+
function createLPos(key, element, options) {
|
|
2170
|
+
const args = [key, element];
|
|
2171
|
+
if (options) {
|
|
2172
|
+
if (options.rank !== undefined) {
|
|
2173
|
+
args.push("RANK");
|
|
2174
|
+
args.push(options.rank.toString());
|
|
2175
|
+
}
|
|
2176
|
+
if (options.count !== undefined) {
|
|
2177
|
+
args.push("COUNT");
|
|
2178
|
+
args.push(options.count.toString());
|
|
2179
|
+
}
|
|
2180
|
+
if (options.maxLength !== undefined) {
|
|
2181
|
+
args.push("MAXLEN");
|
|
2182
|
+
args.push(options.maxLength.toString());
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2185
|
+
return createCommand(RequestType.LPos, args);
|
|
2186
|
+
}
|
|
2187
|
+
/**
|
|
2188
|
+
* @internal
|
|
2189
|
+
*/
|
|
2190
|
+
function createDBSize() {
|
|
2191
|
+
return createCommand(RequestType.DBSize, []);
|
|
2192
|
+
}
|
|
2193
|
+
/**
|
|
2194
|
+
* An optional condition to the {@link BaseClient.geoadd | geoadd},
|
|
2195
|
+
* {@link BaseClient.zadd | zadd} and {@link BaseClient.set | set} commands.
|
|
2196
|
+
*/
|
|
2197
|
+
var ConditionalChange;
|
|
2198
|
+
(function (ConditionalChange) {
|
|
2199
|
+
/**
|
|
2200
|
+
* Only update elements that already exist. Don't add new elements. Equivalent to `XX` in the Valkey API.
|
|
2201
|
+
*/
|
|
2202
|
+
ConditionalChange["ONLY_IF_EXISTS"] = "XX";
|
|
2203
|
+
/**
|
|
2204
|
+
* Only add new elements. Don't update already existing elements. Equivalent to `NX` in the Valkey API.
|
|
2205
|
+
*/
|
|
2206
|
+
ConditionalChange["ONLY_IF_DOES_NOT_EXIST"] = "NX";
|
|
2207
|
+
})(ConditionalChange || (exports.ConditionalChange = ConditionalChange = {}));
|
|
2208
|
+
/**
|
|
2209
|
+
* @internal
|
|
2210
|
+
*/
|
|
2211
|
+
function createGeoAdd(key, membersToGeospatialData, options) {
|
|
2212
|
+
let args = [key];
|
|
2213
|
+
if (options) {
|
|
2214
|
+
if (options.updateMode) {
|
|
2215
|
+
args.push(options.updateMode);
|
|
2216
|
+
}
|
|
2217
|
+
if (options.changed) {
|
|
2218
|
+
args.push("CH");
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
membersToGeospatialData.forEach((coord, member) => {
|
|
2222
|
+
args = args.concat(coord.longitude.toString(), coord.latitude.toString(), member);
|
|
2223
|
+
});
|
|
2224
|
+
return createCommand(RequestType.GeoAdd, args);
|
|
2225
|
+
}
|
|
2226
|
+
/** Enumeration representing distance units options. */
|
|
2227
|
+
var GeoUnit;
|
|
2228
|
+
(function (GeoUnit) {
|
|
2229
|
+
/** Represents distance in meters. */
|
|
2230
|
+
GeoUnit["METERS"] = "m";
|
|
2231
|
+
/** Represents distance in kilometers. */
|
|
2232
|
+
GeoUnit["KILOMETERS"] = "km";
|
|
2233
|
+
/** Represents distance in miles. */
|
|
2234
|
+
GeoUnit["MILES"] = "mi";
|
|
2235
|
+
/** Represents distance in feet. */
|
|
2236
|
+
GeoUnit["FEET"] = "ft";
|
|
2237
|
+
})(GeoUnit || (exports.GeoUnit = GeoUnit = {}));
|
|
2238
|
+
/**
|
|
2239
|
+
* @internal
|
|
2240
|
+
*/
|
|
2241
|
+
function createGeoPos(key, members) {
|
|
2242
|
+
return createCommand(RequestType.GeoPos, [key].concat(members));
|
|
2243
|
+
}
|
|
2244
|
+
/**
|
|
2245
|
+
* @internal
|
|
2246
|
+
*/
|
|
2247
|
+
function createGeoDist(key, member1, member2, geoUnit) {
|
|
2248
|
+
const args = [key, member1, member2];
|
|
2249
|
+
if (geoUnit) {
|
|
2250
|
+
args.push(geoUnit);
|
|
2251
|
+
}
|
|
2252
|
+
return createCommand(RequestType.GeoDist, args);
|
|
2253
|
+
}
|
|
2254
|
+
/**
|
|
2255
|
+
* @internal
|
|
2256
|
+
*/
|
|
2257
|
+
function createGeoHash(key, members) {
|
|
2258
|
+
const args = [key].concat(members);
|
|
2259
|
+
return createCommand(RequestType.GeoHash, args);
|
|
2260
|
+
}
|
|
2261
|
+
/** Defines the sort order for nested results. */
|
|
2262
|
+
var SortOrder;
|
|
2263
|
+
(function (SortOrder) {
|
|
2264
|
+
/** Sort by ascending order. */
|
|
2265
|
+
SortOrder["ASC"] = "ASC";
|
|
2266
|
+
/** Sort by descending order. */
|
|
2267
|
+
SortOrder["DESC"] = "DESC";
|
|
2268
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
2269
|
+
/** @internal */
|
|
2270
|
+
function createGeoSearch(key, searchFrom, searchBy, resultOptions) {
|
|
2271
|
+
const args = [key].concat(convertGeoSearchOptionsToArgs(searchFrom, searchBy, resultOptions));
|
|
2272
|
+
return createCommand(RequestType.GeoSearch, args);
|
|
2273
|
+
}
|
|
2274
|
+
/** @internal */
|
|
2275
|
+
function createGeoSearchStore(destination, source, searchFrom, searchBy, resultOptions) {
|
|
2276
|
+
const args = [destination, source].concat(convertGeoSearchOptionsToArgs(searchFrom, searchBy, resultOptions));
|
|
2277
|
+
return createCommand(RequestType.GeoSearchStore, args);
|
|
2278
|
+
}
|
|
2279
|
+
function convertGeoSearchOptionsToArgs(searchFrom, searchBy, resultOptions) {
|
|
2280
|
+
var _a;
|
|
2281
|
+
let args = [];
|
|
2282
|
+
if ("position" in searchFrom) {
|
|
2283
|
+
args = args.concat("FROMLONLAT", searchFrom.position.longitude.toString(), searchFrom.position.latitude.toString());
|
|
2284
|
+
}
|
|
2285
|
+
else {
|
|
2286
|
+
args = args.concat("FROMMEMBER", searchFrom.member);
|
|
2287
|
+
}
|
|
2288
|
+
if ("radius" in searchBy) {
|
|
2289
|
+
args = args.concat("BYRADIUS", searchBy.radius.toString(), searchBy.unit);
|
|
2290
|
+
}
|
|
2291
|
+
else {
|
|
2292
|
+
args = args.concat("BYBOX", searchBy.width.toString(), searchBy.height.toString(), searchBy.unit);
|
|
2293
|
+
}
|
|
2294
|
+
if (resultOptions) {
|
|
2295
|
+
if ("withCoord" in resultOptions &&
|
|
2296
|
+
resultOptions.withCoord)
|
|
2297
|
+
args.push("WITHCOORD");
|
|
2298
|
+
if ("withDist" in resultOptions &&
|
|
2299
|
+
resultOptions.withDist)
|
|
2300
|
+
args.push("WITHDIST");
|
|
2301
|
+
if ("withHash" in resultOptions &&
|
|
2302
|
+
resultOptions.withHash)
|
|
2303
|
+
args.push("WITHHASH");
|
|
2304
|
+
if ("storeDist" in resultOptions &&
|
|
2305
|
+
resultOptions.storeDist)
|
|
2306
|
+
args.push("STOREDIST");
|
|
2307
|
+
if (resultOptions.count) {
|
|
2308
|
+
args.push("COUNT", (_a = resultOptions.count) === null || _a === void 0 ? void 0 : _a.toString());
|
|
2309
|
+
if (resultOptions.isAny)
|
|
2310
|
+
args.push("ANY");
|
|
2311
|
+
}
|
|
2312
|
+
if (resultOptions.sortOrder)
|
|
2313
|
+
args.push(resultOptions.sortOrder);
|
|
2314
|
+
}
|
|
2315
|
+
return args;
|
|
2316
|
+
}
|
|
2317
|
+
/**
|
|
2318
|
+
* @internal
|
|
2319
|
+
*/
|
|
2320
|
+
function createZRevRank(key, member) {
|
|
2321
|
+
return createCommand(RequestType.ZRevRank, [key, member]);
|
|
2322
|
+
}
|
|
2323
|
+
/**
|
|
2324
|
+
* @internal
|
|
2325
|
+
*/
|
|
2326
|
+
function createZRevRankWithScore(key, member) {
|
|
2327
|
+
return createCommand(RequestType.ZRevRank, [key, member, "WITHSCORE"]);
|
|
2328
|
+
}
|
|
2329
|
+
/**
|
|
2330
|
+
* Mandatory option for zmpop.
|
|
2331
|
+
* Defines which elements to pop from the sorted set.
|
|
2332
|
+
*/
|
|
2333
|
+
var ScoreFilter;
|
|
2334
|
+
(function (ScoreFilter) {
|
|
2335
|
+
/** Pop elements with the highest scores. */
|
|
2336
|
+
ScoreFilter["MAX"] = "MAX";
|
|
2337
|
+
/** Pop elements with the lowest scores. */
|
|
2338
|
+
ScoreFilter["MIN"] = "MIN";
|
|
2339
|
+
})(ScoreFilter || (exports.ScoreFilter = ScoreFilter = {}));
|
|
2340
|
+
/**
|
|
2341
|
+
* @internal
|
|
2342
|
+
*/
|
|
2343
|
+
function createZMPop(keys, modifier, count) {
|
|
2344
|
+
const args = keys;
|
|
2345
|
+
args.unshift(keys.length.toString());
|
|
2346
|
+
args.push(modifier);
|
|
2347
|
+
if (count !== undefined) {
|
|
2348
|
+
args.push("COUNT");
|
|
2349
|
+
args.push(count.toString());
|
|
2350
|
+
}
|
|
2351
|
+
return createCommand(RequestType.ZMPop, args);
|
|
2352
|
+
}
|
|
2353
|
+
/**
|
|
2354
|
+
* @internal
|
|
2355
|
+
*/
|
|
2356
|
+
function createBZMPop(keys, modifier, timeout, count) {
|
|
2357
|
+
const args = [
|
|
2358
|
+
timeout.toString(),
|
|
2359
|
+
keys.length.toString(),
|
|
2360
|
+
...keys,
|
|
2361
|
+
modifier,
|
|
2362
|
+
];
|
|
2363
|
+
if (count !== undefined) {
|
|
2364
|
+
args.push("COUNT");
|
|
2365
|
+
args.push(count.toString());
|
|
2366
|
+
}
|
|
2367
|
+
return createCommand(RequestType.BZMPop, args);
|
|
2368
|
+
}
|
|
2369
|
+
/**
|
|
2370
|
+
* @internal
|
|
2371
|
+
*/
|
|
2372
|
+
function createZIncrBy(key, increment, member) {
|
|
2373
|
+
return createCommand(RequestType.ZIncrBy, [
|
|
2374
|
+
key,
|
|
2375
|
+
increment.toString(),
|
|
2376
|
+
member,
|
|
2377
|
+
]);
|
|
2378
|
+
}
|
|
2379
|
+
/** @internal */
|
|
2380
|
+
function createSort(key, options, destination) {
|
|
2381
|
+
return createSortImpl(RequestType.Sort, key, options, destination);
|
|
2382
|
+
}
|
|
2383
|
+
/** @internal */
|
|
2384
|
+
function createSortReadOnly(key, options) {
|
|
2385
|
+
return createSortImpl(RequestType.SortReadOnly, key, options);
|
|
2386
|
+
}
|
|
2387
|
+
/** @internal */
|
|
2388
|
+
function createSortImpl(cmd, key, options, destination) {
|
|
2389
|
+
const args = [key];
|
|
2390
|
+
if (options) {
|
|
2391
|
+
if (options.limit) {
|
|
2392
|
+
args.push("LIMIT", options.limit.offset.toString(), options.limit.count.toString());
|
|
2393
|
+
}
|
|
2394
|
+
if (options.orderBy) {
|
|
2395
|
+
args.push(options.orderBy);
|
|
2396
|
+
}
|
|
2397
|
+
if (options.isAlpha) {
|
|
2398
|
+
args.push("ALPHA");
|
|
2399
|
+
}
|
|
2400
|
+
if (options.byPattern) {
|
|
2401
|
+
args.push("BY", options.byPattern);
|
|
2402
|
+
}
|
|
2403
|
+
if (options.getPatterns) {
|
|
2404
|
+
options.getPatterns.forEach((p) => args.push("GET", p));
|
|
2405
|
+
}
|
|
2406
|
+
}
|
|
2407
|
+
if (destination)
|
|
2408
|
+
args.push("STORE", destination);
|
|
2409
|
+
return createCommand(cmd, args);
|
|
2410
|
+
}
|
|
2411
|
+
/**
|
|
2412
|
+
* @internal
|
|
2413
|
+
*/
|
|
2414
|
+
function createHStrlen(key, field) {
|
|
2415
|
+
return createCommand(RequestType.HStrlen, [key, field]);
|
|
2416
|
+
}
|
|
2417
|
+
/** @internal */
|
|
2418
|
+
function createHRandField(key, count, withValues) {
|
|
2419
|
+
const args = [key];
|
|
2420
|
+
if (count !== undefined)
|
|
2421
|
+
args.push(count.toString());
|
|
2422
|
+
if (withValues)
|
|
2423
|
+
args.push("WITHVALUES");
|
|
2424
|
+
return createCommand(RequestType.HRandField, args);
|
|
2425
|
+
}
|
|
2426
|
+
/**
|
|
2427
|
+
* @internal
|
|
2428
|
+
*/
|
|
2429
|
+
function createHScan(key, cursor, options) {
|
|
2430
|
+
let args = [key, cursor];
|
|
2431
|
+
if (options) {
|
|
2432
|
+
args = args.concat(convertBaseScanOptionsToArgsArray(options));
|
|
2433
|
+
if (options.noValues) {
|
|
2434
|
+
args.push("NOVALUES");
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
return createCommand(RequestType.HScan, args);
|
|
2438
|
+
}
|
|
2439
|
+
/**
|
|
2440
|
+
* @internal
|
|
2441
|
+
*/
|
|
2442
|
+
function createZRandMember(key, count, withscores) {
|
|
2443
|
+
const args = [key];
|
|
2444
|
+
if (count !== undefined) {
|
|
2445
|
+
args.push(count.toString());
|
|
2446
|
+
}
|
|
2447
|
+
if (withscores) {
|
|
2448
|
+
args.push("WITHSCORES");
|
|
2449
|
+
}
|
|
2450
|
+
return createCommand(RequestType.ZRandMember, args);
|
|
2451
|
+
}
|
|
2452
|
+
/** @internal */
|
|
2453
|
+
function createLastSave() {
|
|
2454
|
+
return createCommand(RequestType.LastSave, []);
|
|
2455
|
+
}
|
|
2456
|
+
/** @internal */
|
|
2457
|
+
function createLCS(key1, key2, options) {
|
|
2458
|
+
const args = [key1, key2];
|
|
2459
|
+
if (options) {
|
|
2460
|
+
if (options.len)
|
|
2461
|
+
args.push("LEN");
|
|
2462
|
+
else if (options.idx) {
|
|
2463
|
+
args.push("IDX");
|
|
2464
|
+
if (options.idx.withMatchLen)
|
|
2465
|
+
args.push("WITHMATCHLEN");
|
|
2466
|
+
if (options.idx.minMatchLen !== undefined)
|
|
2467
|
+
args.push("MINMATCHLEN", options.idx.minMatchLen.toString());
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
return createCommand(RequestType.LCS, args);
|
|
2471
|
+
}
|
|
2472
|
+
/**
|
|
2473
|
+
* @internal
|
|
2474
|
+
*/
|
|
2475
|
+
function createTouch(keys) {
|
|
2476
|
+
return createCommand(RequestType.Touch, keys);
|
|
2477
|
+
}
|
|
2478
|
+
/** @internal */
|
|
2479
|
+
function createRandomKey() {
|
|
2480
|
+
return createCommand(RequestType.RandomKey, []);
|
|
2481
|
+
}
|
|
2482
|
+
/** @internal */
|
|
2483
|
+
function createWatch(keys) {
|
|
2484
|
+
return createCommand(RequestType.Watch, keys);
|
|
2485
|
+
}
|
|
2486
|
+
/** @internal */
|
|
2487
|
+
function createUnWatch() {
|
|
2488
|
+
return createCommand(RequestType.UnWatch, []);
|
|
2489
|
+
}
|
|
2490
|
+
/** @internal */
|
|
2491
|
+
function createWait(numreplicas, timeout) {
|
|
2492
|
+
return createCommand(RequestType.Wait, [
|
|
2493
|
+
numreplicas.toString(),
|
|
2494
|
+
timeout.toString(),
|
|
2495
|
+
]);
|
|
2496
|
+
}
|
|
2497
|
+
/**
|
|
2498
|
+
* @internal
|
|
2499
|
+
*/
|
|
2500
|
+
function convertBaseScanOptionsToArgsArray(options) {
|
|
2501
|
+
const args = [];
|
|
2502
|
+
if (options.match) {
|
|
2503
|
+
args.push("MATCH", options.match);
|
|
2504
|
+
}
|
|
2505
|
+
if (options.count !== undefined) {
|
|
2506
|
+
args.push("COUNT", options.count.toString());
|
|
2507
|
+
}
|
|
2508
|
+
return args;
|
|
2509
|
+
}
|
|
2510
|
+
/**
|
|
2511
|
+
* @internal
|
|
2512
|
+
*/
|
|
2513
|
+
function createZScan(key, cursor, options) {
|
|
2514
|
+
let args = [key, cursor];
|
|
2515
|
+
if (options) {
|
|
2516
|
+
args = args.concat(convertBaseScanOptionsToArgsArray(options));
|
|
2517
|
+
if (options.noScores) {
|
|
2518
|
+
args.push("NOSCORES");
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
return createCommand(RequestType.ZScan, args);
|
|
2522
|
+
}
|
|
2523
|
+
/** @internal */
|
|
2524
|
+
function createSetRange(key, offset, value) {
|
|
2525
|
+
return createCommand(RequestType.SetRange, [key, offset.toString(), value]);
|
|
2526
|
+
}
|
|
2527
|
+
/** @internal */
|
|
2528
|
+
function createAppend(key, value) {
|
|
2529
|
+
return createCommand(RequestType.Append, [key, value]);
|
|
2530
|
+
}
|
|
2531
|
+
/**
|
|
2532
|
+
* @internal
|
|
2533
|
+
*/
|
|
2534
|
+
function createLMPop(keys, direction, count) {
|
|
2535
|
+
const args = [keys.length.toString(), ...keys, direction];
|
|
2536
|
+
if (count !== undefined) {
|
|
2537
|
+
args.push("COUNT");
|
|
2538
|
+
args.push(count.toString());
|
|
2539
|
+
}
|
|
2540
|
+
return createCommand(RequestType.LMPop, args);
|
|
2541
|
+
}
|
|
2542
|
+
/**
|
|
2543
|
+
* @internal
|
|
2544
|
+
*/
|
|
2545
|
+
function createBLMPop(keys, direction, timeout, count) {
|
|
2546
|
+
const args = [
|
|
2547
|
+
timeout.toString(),
|
|
2548
|
+
keys.length.toString(),
|
|
2549
|
+
...keys,
|
|
2550
|
+
direction,
|
|
2551
|
+
];
|
|
2552
|
+
if (count !== undefined) {
|
|
2553
|
+
args.push("COUNT");
|
|
2554
|
+
args.push(count.toString());
|
|
2555
|
+
}
|
|
2556
|
+
return createCommand(RequestType.BLMPop, args);
|
|
2557
|
+
}
|
|
2558
|
+
/**
|
|
2559
|
+
* @internal
|
|
2560
|
+
*/
|
|
2561
|
+
function createPubSubChannels(pattern) {
|
|
2562
|
+
return createCommand(RequestType.PubSubChannels, pattern ? [pattern] : []);
|
|
2563
|
+
}
|
|
2564
|
+
/**
|
|
2565
|
+
* @internal
|
|
2566
|
+
*/
|
|
2567
|
+
function createPubSubNumPat() {
|
|
2568
|
+
return createCommand(RequestType.PubSubNumPat, []);
|
|
2569
|
+
}
|
|
2570
|
+
/**
|
|
2571
|
+
* @internal
|
|
2572
|
+
*/
|
|
2573
|
+
function createPubSubNumSub(channels) {
|
|
2574
|
+
return createCommand(RequestType.PubSubNumSub, channels ? channels : []);
|
|
2575
|
+
}
|
|
2576
|
+
/**
|
|
2577
|
+
* @internal
|
|
2578
|
+
*/
|
|
2579
|
+
function createPubsubShardChannels(pattern) {
|
|
2580
|
+
return createCommand(RequestType.PubSubSChannels, pattern ? [pattern] : []);
|
|
2581
|
+
}
|
|
2582
|
+
/**
|
|
2583
|
+
* @internal
|
|
2584
|
+
*/
|
|
2585
|
+
function createPubSubShardNumSub(channels) {
|
|
2586
|
+
return createCommand(RequestType.PubSubSNumSub, channels ? channels : []);
|
|
2587
|
+
}
|
|
2588
|
+
/**
|
|
2589
|
+
* @internal
|
|
2590
|
+
*/
|
|
2591
|
+
function createBZPopMax(keys, timeout) {
|
|
2592
|
+
return createCommand(RequestType.BZPopMax, [...keys, timeout.toString()]);
|
|
2593
|
+
}
|
|
2594
|
+
/**
|
|
2595
|
+
* @internal
|
|
2596
|
+
*/
|
|
2597
|
+
function createBZPopMin(keys, timeout) {
|
|
2598
|
+
return createCommand(RequestType.BZPopMin, [...keys, timeout.toString()]);
|
|
2599
|
+
}
|
|
2600
|
+
/**
|
|
2601
|
+
* @internal
|
|
2602
|
+
*/
|
|
2603
|
+
function createScriptShow(sha1) {
|
|
2604
|
+
return createCommand(RequestType.ScriptShow, [sha1]);
|
|
2605
|
+
}
|
|
2606
|
+
/**
|
|
2607
|
+
* Time unit representation which is used in optional arguments for {@link BaseClient.getex|getex} and {@link BaseClient.set|set} command.
|
|
2608
|
+
*/
|
|
2609
|
+
var TimeUnit;
|
|
2610
|
+
(function (TimeUnit) {
|
|
2611
|
+
/**
|
|
2612
|
+
* Set the specified expire time, in seconds. Equivalent to
|
|
2613
|
+
* `EX` in the VALKEY API.
|
|
2614
|
+
*/
|
|
2615
|
+
TimeUnit["Seconds"] = "EX";
|
|
2616
|
+
/**
|
|
2617
|
+
* Set the specified expire time, in milliseconds. Equivalent
|
|
2618
|
+
* to `PX` in the VALKEY API.
|
|
2619
|
+
*/
|
|
2620
|
+
TimeUnit["Milliseconds"] = "PX";
|
|
2621
|
+
/**
|
|
2622
|
+
* Set the specified Unix time at which the key will expire,
|
|
2623
|
+
* in seconds. Equivalent to `EXAT` in the VALKEY API.
|
|
2624
|
+
*/
|
|
2625
|
+
TimeUnit["UnixSeconds"] = "EXAT";
|
|
2626
|
+
/**
|
|
2627
|
+
* Set the specified Unix time at which the key will expire,
|
|
2628
|
+
* in milliseconds. Equivalent to `PXAT` in the VALKEY API.
|
|
2629
|
+
*/
|
|
2630
|
+
TimeUnit["UnixMilliseconds"] = "PXAT";
|
|
2631
|
+
})(TimeUnit || (exports.TimeUnit = TimeUnit = {}));
|
|
2632
|
+
/**
|
|
2633
|
+
* @internal
|
|
2634
|
+
*/
|
|
2635
|
+
function createGetEx(key, options) {
|
|
2636
|
+
const args = [key];
|
|
2637
|
+
if (options) {
|
|
2638
|
+
if (options !== "persist" && !Number.isInteger(options.duration)) {
|
|
2639
|
+
throw new Error(`Received expiry '${JSON.stringify(options.duration)}'. Count must be an integer`);
|
|
2640
|
+
}
|
|
2641
|
+
if (options === "persist") {
|
|
2642
|
+
args.push("PERSIST");
|
|
2643
|
+
}
|
|
2644
|
+
else {
|
|
2645
|
+
args.push(options.type, options.duration.toString());
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
return createCommand(RequestType.GetEx, args);
|
|
2649
|
+
}
|
|
2650
|
+
/**
|
|
2651
|
+
* @internal
|
|
2652
|
+
*/
|
|
2653
|
+
function createXAck(key, group, ids) {
|
|
2654
|
+
return createCommand(RequestType.XAck, [key, group, ...ids]);
|
|
2655
|
+
}
|
|
2656
|
+
/**
|
|
2657
|
+
* @internal
|
|
2658
|
+
*/
|
|
2659
|
+
function createXGroupSetid(key, groupName, id, entriesRead) {
|
|
2660
|
+
const args = [key, groupName, id];
|
|
2661
|
+
if (entriesRead !== undefined) {
|
|
2662
|
+
args.push("ENTRIESREAD");
|
|
2663
|
+
args.push(entriesRead.toString());
|
|
2664
|
+
}
|
|
2665
|
+
return createCommand(RequestType.XGroupSetId, args);
|
|
2666
|
+
}
|
|
2667
|
+
/**
|
|
2668
|
+
* @internal
|
|
2669
|
+
*/
|
|
2670
|
+
function createScriptExists(sha1s) {
|
|
2671
|
+
return createCommand(RequestType.ScriptExists, sha1s);
|
|
2672
|
+
}
|
|
2673
|
+
/**
|
|
2674
|
+
* @internal
|
|
2675
|
+
*/
|
|
2676
|
+
function createScriptFlush(mode) {
|
|
2677
|
+
if (mode) {
|
|
2678
|
+
return createCommand(RequestType.ScriptFlush, [mode.toString()]);
|
|
2679
|
+
}
|
|
2680
|
+
else {
|
|
2681
|
+
return createCommand(RequestType.ScriptFlush, []);
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
/** @internal */
|
|
2685
|
+
function createScriptKill() {
|
|
2686
|
+
return createCommand(RequestType.ScriptKill, []);
|
|
2687
|
+
}
|
|
2688
|
+
//# sourceMappingURL=Commands.js.map
|