-first commit

This commit is contained in:
2025-11-11 12:36:06 +07:00
commit b99c214434
5683 changed files with 713336 additions and 0 deletions

17
node_modules/@redis/bloom/README.md generated vendored Normal file
View File

@@ -0,0 +1,17 @@
# @redis/bloom
This package provides support for the [RedisBloom](https://redis.io/docs/data-types/probabilistic/) module, which adds additional probabilistic data structures to Redis.
Should be used with [`redis`/`@redis/client`](https://github.com/redis/node-redis).
:warning: To use these extra commands, your Redis server must have the RedisBloom module installed.
RedisBloom provides the following probabilistic data structures:
* Bloom Filter: for checking set membership with a high degree of certainty.
* Cuckoo Filter: for checking set membership with a high degree of certainty.
* T-Digest: for estimating the quantiles of a stream of data.
* Top-K: Maintain a list of k most frequently seen items.
* Count-Min Sketch: Determine the frequency of events in a stream.
For some examples, see [`bloom-filter.js`](https://github.com/redis/node-redis/tree/master/examples/bloom-filter.js), [`cuckoo-filter.js`](https://github.com/redis/node-redis/tree/master/examples/cuckoo-filter.js), [`count-min-sketch.js`](https://github.com/redis/node-redis/tree/master/examples/count-min-sketch.js) and [`topk.js`](https://github.com/redis/node-redis/tree/master/examples/topk.js) in the [examples folder](https://github.com/redis/node-redis/tree/master/examples).

View File

@@ -0,0 +1,18 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Adds an item to a Bloom Filter
* @param parser - The command parser
* @param key - The name of the Bloom filter
* @param item - The item to add to the filter
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, item: RedisArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
};
};
export default _default;
//# sourceMappingURL=ADD.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ADD.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/ADD.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;;;IAKzE;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,QAAQ,aAAa;;;;;;AAR7E,wBAc6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
/**
* Adds an item to a Bloom Filter
* @param parser - The command parser
* @param key - The name of the Bloom filter
* @param item - The item to add to the filter
*/
parseCommand(parser, key, item) {
parser.push('BF.ADD');
parser.pushKey(key);
parser.push(item);
},
transformReply: generic_transformers_1.transformBooleanReply
};
//# sourceMappingURL=ADD.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ADD.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/ADD.ts"],"names":[],"mappings":";;AAEA,+FAA6F;AAE7F,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB;QACzE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACtB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,cAAc,EAAE,4CAAqB;CACX,CAAC"}

View File

@@ -0,0 +1,14 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: true;
/**
* Returns the cardinality (number of items) in a Bloom Filter
* @param parser - The command parser
* @param key - The name of the Bloom filter to query
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument) => void;
readonly transformReply: () => NumberReply;
};
export default _default;
//# sourceMappingURL=CARD.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CARD.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/CARD.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;;;IAItF;;;;OAIG;gDACkB,aAAa,OAAO,aAAa;mCAIR,WAAW;;AAX3D,wBAY6B"}

View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
/**
* Returns the cardinality (number of items) in a Bloom Filter
* @param parser - The command parser
* @param key - The name of the Bloom filter to query
*/
parseCommand(parser, key) {
parser.push('BF.CARD');
parser.pushKey(key);
},
transformReply: undefined
};
//# sourceMappingURL=CARD.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CARD.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/CARD.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB;;;;OAIG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB;QACpD,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC"}

View File

@@ -0,0 +1,18 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: true;
/**
* Checks if an item exists in a Bloom Filter
* @param parser - The command parser
* @param key - The name of the Bloom filter
* @param item - The item to check for existence
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, item: RedisArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
};
};
export default _default;
//# sourceMappingURL=EXISTS.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"EXISTS.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/EXISTS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;;;IAKzE;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,QAAQ,aAAa;;;;;;AAR7E,wBAc6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: true,
/**
* Checks if an item exists in a Bloom Filter
* @param parser - The command parser
* @param key - The name of the Bloom filter
* @param item - The item to check for existence
*/
parseCommand(parser, key, item) {
parser.push('BF.EXISTS');
parser.pushKey(key);
parser.push(item);
},
transformReply: generic_transformers_1.transformBooleanReply
};
//# sourceMappingURL=EXISTS.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"EXISTS.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/EXISTS.ts"],"names":[],"mappings":";;AAEA,+FAA6F;AAE7F,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB;QACzE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,cAAc,EAAE,4CAAqB;CACX,CAAC"}

View File

@@ -0,0 +1,39 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NullReply, NumberReply, TuplesToMapReply, SimpleStringReply, TypeMapping } from '@redis/client/dist/lib/RESP/types';
export type BfInfoReplyMap = TuplesToMapReply<[
[
SimpleStringReply<'Capacity'>,
NumberReply
],
[
SimpleStringReply<'Size'>,
NumberReply
],
[
SimpleStringReply<'Number of filters'>,
NumberReply
],
[
SimpleStringReply<'Number of items inserted'>,
NumberReply
],
[
SimpleStringReply<'Expansion rate'>,
NullReply | NumberReply
]
]>;
declare const _default: {
readonly IS_READ_ONLY: true;
/**
* Returns information about a Bloom Filter, including capacity, size, number of filters, items inserted, and expansion rate
* @param parser - The command parser
* @param key - The name of the Bloom filter to get information about
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument) => void;
readonly transformReply: {
readonly 2: (this: void, reply: [SimpleStringReply<"Capacity">, NumberReply<number>, SimpleStringReply<"Size">, NumberReply<number>, SimpleStringReply<"Number of filters">, NumberReply<number>, SimpleStringReply<"Number of items inserted">, NumberReply<number>, SimpleStringReply<"Expansion rate">, NullReply | NumberReply<number>], _: any, typeMapping?: TypeMapping) => BfInfoReplyMap;
readonly 3: () => BfInfoReplyMap;
};
};
export default _default;
//# sourceMappingURL=INFO.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INFO.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/INFO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAwB,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAc,iBAAiB,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAG9K,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC;IAC5C;QAAC,iBAAiB,CAAC,UAAU,CAAC;QAAE,WAAW;KAAC;IAC5C;QAAC,iBAAiB,CAAC,MAAM,CAAC;QAAE,WAAW;KAAC;IACxC;QAAC,iBAAiB,CAAC,mBAAmB,CAAC;QAAE,WAAW;KAAC;IACrD;QAAC,iBAAiB,CAAC,0BAA0B,CAAC;QAAE,WAAW;KAAC;IAC5D;QAAC,iBAAiB,CAAC,gBAAgB,CAAC;QAAE,SAAS,GAAG,WAAW;KAAC;CAC/D,CAAC,CAAC;;;IAID;;;;OAIG;gDACkB,aAAa,OAAO,aAAa;;2WAKiB,WAAW;;;;AAZpF,wBAiB6B"}

View File

@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const helpers_1 = require("./helpers");
exports.default = {
IS_READ_ONLY: true,
/**
* Returns information about a Bloom Filter, including capacity, size, number of filters, items inserted, and expansion rate
* @param parser - The command parser
* @param key - The name of the Bloom filter to get information about
*/
parseCommand(parser, key) {
parser.push('BF.INFO');
parser.pushKey(key);
},
transformReply: {
2: (reply, _, typeMapping) => {
return (0, helpers_1.transformInfoV2Reply)(reply, typeMapping);
},
3: undefined
}
};
//# sourceMappingURL=INFO.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INFO.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/INFO.ts"],"names":[],"mappings":";;AAEA,uCAAiD;AAUjD,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB;;;;OAIG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB;QACpD,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CAAC,KAA8C,EAAE,CAAC,EAAE,WAAyB,EAAkB,EAAE;YAClG,OAAO,IAAA,8BAAoB,EAAiB,KAAK,EAAE,WAAW,CAAC,CAAC;QAClE,CAAC;QACD,CAAC,EAAE,SAA4C;KAChD;CACyB,CAAC"}

View File

@@ -0,0 +1,32 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
export interface BfInsertOptions {
CAPACITY?: number;
ERROR?: number;
EXPANSION?: number;
NOCREATE?: boolean;
NONSCALING?: boolean;
}
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Adds one or more items to a Bloom Filter, creating it if it does not exist
* @param parser - The command parser
* @param key - The name of the Bloom filter
* @param items - One or more items to add to the filter
* @param options - Optional parameters for filter creation
* @param options.CAPACITY - Desired capacity for a new filter
* @param options.ERROR - Desired error rate for a new filter
* @param options.EXPANSION - Expansion rate for a new filter
* @param options.NOCREATE - If true, prevents automatic filter creation
* @param options.NONSCALING - Prevents the filter from creating additional sub-filters
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, items: RedisVariadicArgument, options?: BfInsertOptions) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
};
};
export default _default;
//# sourceMappingURL=INSERT.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INSERT.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/INSERT.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAG7F,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;;;IAIC;;;;;;;;;;;OAWG;gDAEO,aAAa,OAChB,aAAa,SACX,qBAAqB,YAClB,eAAe;;;;;;AAlB7B,wBA+C6B"}

View File

@@ -0,0 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
/**
* Adds one or more items to a Bloom Filter, creating it if it does not exist
* @param parser - The command parser
* @param key - The name of the Bloom filter
* @param items - One or more items to add to the filter
* @param options - Optional parameters for filter creation
* @param options.CAPACITY - Desired capacity for a new filter
* @param options.ERROR - Desired error rate for a new filter
* @param options.EXPANSION - Expansion rate for a new filter
* @param options.NOCREATE - If true, prevents automatic filter creation
* @param options.NONSCALING - Prevents the filter from creating additional sub-filters
*/
parseCommand(parser, key, items, options) {
parser.push('BF.INSERT');
parser.pushKey(key);
if (options?.CAPACITY !== undefined) {
parser.push('CAPACITY', options.CAPACITY.toString());
}
if (options?.ERROR !== undefined) {
parser.push('ERROR', options.ERROR.toString());
}
if (options?.EXPANSION !== undefined) {
parser.push('EXPANSION', options.EXPANSION.toString());
}
if (options?.NOCREATE) {
parser.push('NOCREATE');
}
if (options?.NONSCALING) {
parser.push('NONSCALING');
}
parser.push('ITEMS');
parser.pushVariadic(items);
},
transformReply: generic_transformers_1.transformBooleanArrayReply
};
//# sourceMappingURL=INSERT.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INSERT.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/INSERT.ts"],"names":[],"mappings":";;AAGA,+FAAkG;AAUlG,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;;;;;;;OAWG;IACH,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,KAA4B,EAC5B,OAAyB;QAEzB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,QAAQ,KAAK,SAAS,EAAE,CAAC;YACpC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QACvD,CAAC;QAED,IAAI,OAAO,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACjD,CAAC;QAED,IAAI,OAAO,EAAE,SAAS,KAAK,SAAS,EAAE,CAAC;YACrC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;QACzD,CAAC;QAED,IAAI,OAAO,EAAE,QAAQ,EAAE,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1B,CAAC;QAED,IAAI,OAAO,EAAE,UAAU,EAAE,CAAC;YACxB,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC5B,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrB,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACD,cAAc,EAAE,iDAA0B;CAChB,CAAC"}

View File

@@ -0,0 +1,16 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Restores a Bloom Filter chunk previously saved using SCANDUMP
* @param parser - The command parser
* @param key - The name of the Bloom filter to restore
* @param iterator - Iterator value from the SCANDUMP command
* @param chunk - Data chunk from the SCANDUMP command
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, iterator: number, chunk: RedisArgument) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=LOADCHUNK.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"LOADCHUNK.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/LOADCHUNK.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;;;IAI5F;;;;;;OAMG;gDACkB,aAAa,OAAO,aAAa,YAAY,MAAM,SAAS,aAAa;mCAKhD,kBAAkB,IAAI,CAAC;;AAdvE,wBAe6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
/**
* Restores a Bloom Filter chunk previously saved using SCANDUMP
* @param parser - The command parser
* @param key - The name of the Bloom filter to restore
* @param iterator - Iterator value from the SCANDUMP command
* @param chunk - Data chunk from the SCANDUMP command
*/
parseCommand(parser, key, iterator, chunk) {
parser.push('BF.LOADCHUNK');
parser.pushKey(key);
parser.push(iterator.toString(), chunk);
},
transformReply: undefined
};
//# sourceMappingURL=LOADCHUNK.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"LOADCHUNK.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/LOADCHUNK.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;;OAMG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,QAAgB,EAAE,KAAoB;QAC5F,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC"}

View File

@@ -0,0 +1,19 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Adds multiple items to a Bloom Filter in a single call
* @param parser - The command parser
* @param key - The name of the Bloom filter
* @param items - One or more items to add to the filter
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, items: RedisVariadicArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
};
};
export default _default;
//# sourceMappingURL=MADD.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MADD.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/MADD.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;;;IAK3F;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,SAAS,qBAAqB;;;;;;AARtF,wBAc6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
/**
* Adds multiple items to a Bloom Filter in a single call
* @param parser - The command parser
* @param key - The name of the Bloom filter
* @param items - One or more items to add to the filter
*/
parseCommand(parser, key, items) {
parser.push('BF.MADD');
parser.pushKey(key);
parser.pushVariadic(items);
},
transformReply: generic_transformers_1.transformBooleanArrayReply
};
//# sourceMappingURL=MADD.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MADD.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/MADD.ts"],"names":[],"mappings":";;AAGA,+FAAkG;AAElG,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,KAA4B;QAClF,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACD,cAAc,EAAE,iDAA0B;CAChB,CAAC"}

View File

@@ -0,0 +1,19 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
declare const _default: {
readonly IS_READ_ONLY: true;
/**
* Checks if multiple items exist in a Bloom Filter in a single call
* @param parser - The command parser
* @param key - The name of the Bloom filter
* @param items - One or more items to check for existence
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, items: RedisVariadicArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
};
};
export default _default;
//# sourceMappingURL=MEXISTS.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MEXISTS.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/MEXISTS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;;;IAK3F;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,SAAS,qBAAqB;;;;;;AARtF,wBAc6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: true,
/**
* Checks if multiple items exist in a Bloom Filter in a single call
* @param parser - The command parser
* @param key - The name of the Bloom filter
* @param items - One or more items to check for existence
*/
parseCommand(parser, key, items) {
parser.push('BF.MEXISTS');
parser.pushKey(key);
parser.pushVariadic(items);
},
transformReply: generic_transformers_1.transformBooleanArrayReply
};
//# sourceMappingURL=MEXISTS.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MEXISTS.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/MEXISTS.ts"],"names":[],"mappings":";;AAGA,+FAAkG;AAElG,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,KAA4B;QAClF,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACD,cAAc,EAAE,iDAA0B;CAChB,CAAC"}

View File

@@ -0,0 +1,23 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
export interface BfReserveOptions {
EXPANSION?: number;
NONSCALING?: boolean;
}
declare const _default: {
readonly IS_READ_ONLY: true;
/**
* Creates an empty Bloom Filter with a given desired error ratio and initial capacity
* @param parser - The command parser
* @param key - The name of the Bloom filter to create
* @param errorRate - The desired probability for false positives (between 0 and 1)
* @param capacity - The number of entries intended to be added to the filter
* @param options - Optional parameters to tune the filter
* @param options.EXPANSION - Expansion rate for the filter
* @param options.NONSCALING - Prevents the filter from creating additional sub-filters
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, errorRate: number, capacity: number, options?: BfReserveOptions) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=RESERVE.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"RESERVE.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/RESERVE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;AAE9F,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;;;IAIC;;;;;;;;;OASG;gDAEO,aAAa,OAChB,aAAa,aACP,MAAM,YACP,MAAM,YACN,gBAAgB;mCAckB,kBAAkB,IAAI,CAAC;;AA/BvE,wBAgC6B"}

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
/**
* Creates an empty Bloom Filter with a given desired error ratio and initial capacity
* @param parser - The command parser
* @param key - The name of the Bloom filter to create
* @param errorRate - The desired probability for false positives (between 0 and 1)
* @param capacity - The number of entries intended to be added to the filter
* @param options - Optional parameters to tune the filter
* @param options.EXPANSION - Expansion rate for the filter
* @param options.NONSCALING - Prevents the filter from creating additional sub-filters
*/
parseCommand(parser, key, errorRate, capacity, options) {
parser.push('BF.RESERVE');
parser.pushKey(key);
parser.push(errorRate.toString(), capacity.toString());
if (options?.EXPANSION) {
parser.push('EXPANSION', options.EXPANSION.toString());
}
if (options?.NONSCALING) {
parser.push('NONSCALING');
}
},
transformReply: undefined
};
//# sourceMappingURL=RESERVE.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"RESERVE.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/RESERVE.ts"],"names":[],"mappings":";;AAQA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB;;;;;;;;;OASG;IACH,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,SAAiB,EACjB,QAAgB,EAChB,OAA0B;QAE1B,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEvD,IAAI,OAAO,EAAE,SAAS,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC3D,CAAC;QAED,IAAI,OAAO,EAAE,UAAU,EAAE,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC"}

View File

@@ -0,0 +1,18 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply, BlobStringReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: true;
/**
* Begins an incremental save of a Bloom Filter. This is useful for large filters that can't be saved at once
* @param parser - The command parser
* @param key - The name of the Bloom filter to save
* @param iterator - Iterator value; Start at 0, and use the iterator from the response for the next chunk
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, iterator: number) => void;
readonly transformReply: (this: void, reply: [NumberReply<number>, BlobStringReply<string>]) => {
iterator: NumberReply<number>;
chunk: BlobStringReply<string>;
};
};
export default _default;
//# sourceMappingURL=SCANDUMP.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SCANDUMP.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/SCANDUMP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAe,WAAW,EAAE,eAAe,EAAwB,MAAM,mCAAmC,CAAC;;;IAIjI;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,YAAY,MAAM;;;;;;AAR1E,wBAmB6B"}

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
/**
* Begins an incremental save of a Bloom Filter. This is useful for large filters that can't be saved at once
* @param parser - The command parser
* @param key - The name of the Bloom filter to save
* @param iterator - Iterator value; Start at 0, and use the iterator from the response for the next chunk
*/
parseCommand(parser, key, iterator) {
parser.push('BF.SCANDUMP');
parser.pushKey(key);
parser.push(iterator.toString());
},
transformReply(reply) {
return {
iterator: reply[0],
chunk: reply[1]
};
}
};
//# sourceMappingURL=SCANDUMP.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SCANDUMP.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/SCANDUMP.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,QAAgB;QACtE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACnC,CAAC;IACD,cAAc,CAAC,KAA+D;QAC5E,OAAO;YACL,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;YAClB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;SAChB,CAAC;IACJ,CAAC;CACyB,CAAC"}

View File

@@ -0,0 +1,3 @@
import { TypeMapping } from "@redis/client";
export declare function transformInfoV2Reply<T>(reply: Array<any>, typeMapping?: TypeMapping): T;
//# sourceMappingURL=helpers.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,eAAe,CAAC;AAExD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,CAAC,CA0BvF"}

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformInfoV2Reply = void 0;
const client_1 = require("@redis/client");
function transformInfoV2Reply(reply, typeMapping) {
const mapType = typeMapping ? typeMapping[client_1.RESP_TYPES.MAP] : undefined;
switch (mapType) {
case Array: {
return reply;
}
case Map: {
const ret = new Map();
for (let i = 0; i < reply.length; i += 2) {
ret.set(reply[i].toString(), reply[i + 1]);
}
return ret;
}
default: {
const ret = Object.create(null);
for (let i = 0; i < reply.length; i += 2) {
ret[reply[i].toString()] = reply[i + 1];
}
return ret;
}
}
}
exports.transformInfoV2Reply = transformInfoV2Reply;
//# sourceMappingURL=helpers.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/helpers.ts"],"names":[],"mappings":";;;AAAA,0CAAwD;AAExD,SAAgB,oBAAoB,CAAI,KAAiB,EAAE,WAAyB;IAClF,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,mBAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEtE,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,KAAK,CAAC,CAAC,CAAC;YACX,OAAO,KAAqB,CAAC;QAC/B,CAAC;QACD,KAAK,GAAG,CAAC,CAAC,CAAC;YACT,MAAM,GAAG,GAAG,IAAI,GAAG,EAAe,CAAC;YAEnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC7C,CAAC;YAED,OAAO,GAAmB,CAAC;QAC7B,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAEhC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC1C,CAAC;YAED,OAAO,GAAmB,CAAC;QAC7B,CAAC;IACH,CAAC;AACH,CAAC;AA1BD,oDA0BC"}

View File

@@ -0,0 +1,147 @@
export * from './helpers';
declare const _default: {
readonly ADD: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, item: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
};
};
readonly add: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, item: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
};
};
readonly CARD: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
readonly card: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
readonly EXISTS: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, item: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
};
};
readonly exists: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, item: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
};
};
readonly INFO: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: {
readonly 2: (this: void, reply: [import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"Capacity">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"Size">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"Number of filters">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"Number of items inserted">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"Expansion rate">, import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").NumberReply<number>], _: any, typeMapping?: import("@redis/client/dist/lib/RESP/types").TypeMapping | undefined) => import("./INFO").BfInfoReplyMap;
readonly 3: () => import("./INFO").BfInfoReplyMap;
};
};
readonly info: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: {
readonly 2: (this: void, reply: [import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"Capacity">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"Size">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"Number of filters">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"Number of items inserted">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"Expansion rate">, import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").NumberReply<number>], _: any, typeMapping?: import("@redis/client/dist/lib/RESP/types").TypeMapping | undefined) => import("./INFO").BfInfoReplyMap;
readonly 3: () => import("./INFO").BfInfoReplyMap;
};
};
readonly INSERT: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument, options?: import("./INSERT").BfInsertOptions | undefined) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
};
};
readonly insert: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument, options?: import("./INSERT").BfInsertOptions | undefined) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
};
};
readonly LOADCHUNK: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, iterator: number, chunk: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
readonly loadChunk: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, iterator: number, chunk: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
readonly MADD: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
};
};
readonly mAdd: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
};
};
readonly MEXISTS: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
};
};
readonly mExists: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
};
};
readonly RESERVE: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, errorRate: number, capacity: number, options?: import("./RESERVE").BfReserveOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
readonly reserve: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, errorRate: number, capacity: number, options?: import("./RESERVE").BfReserveOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
readonly SCANDUMP: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, iterator: number) => void;
readonly transformReply: (this: void, reply: [import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>]) => {
iterator: import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
chunk: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
};
};
readonly scanDump: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, iterator: number) => void;
readonly transformReply: (this: void, reply: [import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>]) => {
iterator: import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
chunk: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
};
};
};
export default _default;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bloom/index.ts"],"names":[],"mappings":"AAaA,cAAc,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1B,wBAqBmC"}

View File

@@ -0,0 +1,53 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const ADD_1 = __importDefault(require("./ADD"));
const CARD_1 = __importDefault(require("./CARD"));
const EXISTS_1 = __importDefault(require("./EXISTS"));
const INFO_1 = __importDefault(require("./INFO"));
const INSERT_1 = __importDefault(require("./INSERT"));
const LOADCHUNK_1 = __importDefault(require("./LOADCHUNK"));
const MADD_1 = __importDefault(require("./MADD"));
const MEXISTS_1 = __importDefault(require("./MEXISTS"));
const RESERVE_1 = __importDefault(require("./RESERVE"));
const SCANDUMP_1 = __importDefault(require("./SCANDUMP"));
__exportStar(require("./helpers"), exports);
exports.default = {
ADD: ADD_1.default,
add: ADD_1.default,
CARD: CARD_1.default,
card: CARD_1.default,
EXISTS: EXISTS_1.default,
exists: EXISTS_1.default,
INFO: INFO_1.default,
info: INFO_1.default,
INSERT: INSERT_1.default,
insert: INSERT_1.default,
LOADCHUNK: LOADCHUNK_1.default,
loadChunk: LOADCHUNK_1.default,
MADD: MADD_1.default,
mAdd: MADD_1.default,
MEXISTS: MEXISTS_1.default,
mExists: MEXISTS_1.default,
RESERVE: RESERVE_1.default,
reserve: RESERVE_1.default,
SCANDUMP: SCANDUMP_1.default,
scanDump: SCANDUMP_1.default
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/commands/bloom/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,gDAAwB;AACxB,kDAA0B;AAC1B,sDAA8B;AAC9B,kDAA0B;AAC1B,sDAA8B;AAC9B,4DAAoC;AACpC,kDAA0B;AAC1B,wDAAgC;AAChC,wDAAgC;AAChC,0DAAkC;AAElC,4CAA0B;AAE1B,kBAAe;IACb,GAAG,EAAH,aAAG;IACH,GAAG,EAAE,aAAG;IACR,IAAI,EAAJ,cAAI;IACJ,IAAI,EAAE,cAAI;IACV,MAAM,EAAN,gBAAM;IACN,MAAM,EAAE,gBAAM;IACd,IAAI,EAAJ,cAAI;IACJ,IAAI,EAAE,cAAI;IACV,MAAM,EAAN,gBAAM;IACN,MAAM,EAAE,gBAAM;IACd,SAAS,EAAT,mBAAS;IACT,SAAS,EAAE,mBAAS;IACpB,IAAI,EAAJ,cAAI;IACJ,IAAI,EAAE,cAAI;IACV,OAAO,EAAP,iBAAO;IACP,OAAO,EAAE,iBAAO;IAChB,OAAO,EAAP,iBAAO;IACP,OAAO,EAAE,iBAAO;IAChB,QAAQ,EAAR,kBAAQ;IACR,QAAQ,EAAE,kBAAQ;CACc,CAAC"}

View File

@@ -0,0 +1,19 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, NumberReply } from '@redis/client/dist/lib/RESP/types';
export interface BfIncrByItem {
item: RedisArgument;
incrementBy: number;
}
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Increases the count of one or more items in a Count-Min Sketch
* @param parser - The command parser
* @param key - The name of the sketch
* @param items - A single item or array of items to increment, each with an item and increment value
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, items: BfIncrByItem | Array<BfIncrByItem>) => void;
readonly transformReply: () => ArrayReply<NumberReply>;
};
export default _default;
//# sourceMappingURL=INCRBY.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INCRBY.d.ts","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/INCRBY.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAEpG,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;;;IAIC;;;;;OAKG;gDAEO,aAAa,OAChB,aAAa,SACX,YAAY,GAAG,MAAM,YAAY,CAAC;mCAaG,WAAW,WAAW,CAAC;;AAxBvE,wBAyB6B"}

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
/**
* Increases the count of one or more items in a Count-Min Sketch
* @param parser - The command parser
* @param key - The name of the sketch
* @param items - A single item or array of items to increment, each with an item and increment value
*/
parseCommand(parser, key, items) {
parser.push('CMS.INCRBY');
parser.pushKey(key);
if (Array.isArray(items)) {
for (const item of items) {
pushIncrByItem(parser, item);
}
}
else {
pushIncrByItem(parser, items);
}
},
transformReply: undefined
};
function pushIncrByItem(parser, { item, incrementBy }) {
parser.push(item, incrementBy.toString());
}
//# sourceMappingURL=INCRBY.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INCRBY.js","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/INCRBY.ts"],"names":[],"mappings":";;AAQA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;OAKG;IACH,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,KAAyC;QAEzC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC;AAE7B,SAAS,cAAc,CAAC,MAAqB,EAAE,EAAE,IAAI,EAAE,WAAW,EAAgB;IAChF,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC5C,CAAC"}

View File

@@ -0,0 +1,36 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, TuplesToMapReply, NumberReply, SimpleStringReply, TypeMapping } from '@redis/client/dist/lib/RESP/types';
export type CmsInfoReplyMap = TuplesToMapReply<[
[
SimpleStringReply<'width'>,
NumberReply
],
[
SimpleStringReply<'depth'>,
NumberReply
],
[
SimpleStringReply<'count'>,
NumberReply
]
]>;
export interface CmsInfoReply {
width: NumberReply;
depth: NumberReply;
count: NumberReply;
}
declare const _default: {
readonly IS_READ_ONLY: true;
/**
* Returns width, depth, and total count of items in a Count-Min Sketch
* @param parser - The command parser
* @param key - The name of the sketch to get information about
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument) => void;
readonly transformReply: {
readonly 2: (this: void, reply: [SimpleStringReply<"width">, NumberReply<number>, SimpleStringReply<"depth">, NumberReply<number>, SimpleStringReply<"count">, NumberReply<number>], _: any, typeMapping?: TypeMapping) => CmsInfoReply;
readonly 3: () => CmsInfoReply;
};
};
export default _default;
//# sourceMappingURL=INFO.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INFO.d.ts","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/INFO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAoC,iBAAiB,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAGnK,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC;IAC7C;QAAC,iBAAiB,CAAC,OAAO,CAAC;QAAE,WAAW;KAAC;IACzC;QAAC,iBAAiB,CAAC,OAAO,CAAC;QAAE,WAAW;KAAC;IACzC;QAAC,iBAAiB,CAAC,OAAO,CAAC;QAAE,WAAW;KAAC;CAC1C,CAAC,CAAC;AAEH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,WAAW,CAAC;CACpB;;;IAIC;;;;OAIG;gDACkB,aAAa,OAAO,aAAa;;mNAKkB,WAAW,KAAG,YAAY;0BAG/D,YAAY;;;AAfjD,wBAiB6B"}

View File

@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const bloom_1 = require("../bloom");
exports.default = {
IS_READ_ONLY: true,
/**
* Returns width, depth, and total count of items in a Count-Min Sketch
* @param parser - The command parser
* @param key - The name of the sketch to get information about
*/
parseCommand(parser, key) {
parser.push('CMS.INFO');
parser.pushKey(key);
},
transformReply: {
2: (reply, _, typeMapping) => {
return (0, bloom_1.transformInfoV2Reply)(reply, typeMapping);
},
3: undefined
}
};
//# sourceMappingURL=INFO.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INFO.js","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/INFO.ts"],"names":[],"mappings":";;AAEA,oCAAgD;AAchD,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB;;;;OAIG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB;QACpD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CAAC,KAA+C,EAAE,CAAC,EAAE,WAAyB,EAAgB,EAAE;YACjG,OAAO,IAAA,4BAAoB,EAAe,KAAK,EAAE,WAAW,CAAC,CAAC;QAChE,CAAC;QACD,CAAC,EAAE,SAA0C;KAC9C;CACyB,CAAC"}

View File

@@ -0,0 +1,16 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Initialize a Count-Min Sketch using width and depth parameters
* @param parser - The command parser
* @param key - The name of the sketch
* @param width - Number of counters in each array (must be a multiple of 2)
* @param depth - Number of counter arrays (determines accuracy of estimates)
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, width: number, depth: number) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=INITBYDIM.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INITBYDIM.d.ts","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/INITBYDIM.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;;;IAI5F;;;;;;OAMG;gDACkB,aAAa,OAAO,aAAa,SAAS,MAAM,SAAS,MAAM;mCAKtC,kBAAkB,IAAI,CAAC;;AAdvE,wBAe6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
/**
* Initialize a Count-Min Sketch using width and depth parameters
* @param parser - The command parser
* @param key - The name of the sketch
* @param width - Number of counters in each array (must be a multiple of 2)
* @param depth - Number of counter arrays (determines accuracy of estimates)
*/
parseCommand(parser, key, width, depth) {
parser.push('CMS.INITBYDIM');
parser.pushKey(key);
parser.push(width.toString(), depth.toString());
},
transformReply: undefined
};
//# sourceMappingURL=INITBYDIM.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INITBYDIM.js","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/INITBYDIM.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;;OAMG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,KAAa,EAAE,KAAa;QAClF,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC7B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAClD,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC"}

View File

@@ -0,0 +1,16 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Initialize a Count-Min Sketch using error rate and probability parameters
* @param parser - The command parser
* @param key - The name of the sketch
* @param error - Estimate error, as a decimal between 0 and 1
* @param probability - The desired probability for inflated count, as a decimal between 0 and 1
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, error: number, probability: number) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=INITBYPROB.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INITBYPROB.d.ts","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/INITBYPROB.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;;;IAI5F;;;;;;OAMG;gDACkB,aAAa,OAAO,aAAa,SAAS,MAAM,eAAe,MAAM;mCAK5C,kBAAkB,IAAI,CAAC;;AAdvE,wBAe6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
/**
* Initialize a Count-Min Sketch using error rate and probability parameters
* @param parser - The command parser
* @param key - The name of the sketch
* @param error - Estimate error, as a decimal between 0 and 1
* @param probability - The desired probability for inflated count, as a decimal between 0 and 1
*/
parseCommand(parser, key, error, probability) {
parser.push('CMS.INITBYPROB');
parser.pushKey(key);
parser.push(error.toString(), probability.toString());
},
transformReply: undefined
};
//# sourceMappingURL=INITBYPROB.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INITBYPROB.js","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/INITBYPROB.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;;OAMG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,KAAa,EAAE,WAAmB;QACxF,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxD,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC"}

View File

@@ -0,0 +1,20 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
interface BfMergeSketch {
name: RedisArgument;
weight: number;
}
export type BfMergeSketches = Array<RedisArgument> | Array<BfMergeSketch>;
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Merges multiple Count-Min Sketches into a single sketch, with optional weights
* @param parser - The command parser
* @param destination - The name of the destination sketch
* @param source - Array of sketch names or array of sketches with weights
*/
readonly parseCommand: (this: void, parser: CommandParser, destination: RedisArgument, source: BfMergeSketches) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=MERGE.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MERGE.d.ts","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/MERGE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;AAE9F,UAAU,aAAa;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;;;IAIxE;;;;;OAKG;gDAEO,aAAa,eACR,aAAa,UAClB,eAAe;mCAkBqB,kBAAkB,IAAI,CAAC;;AA7BvE,wBA8B6B"}

View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
/**
* Merges multiple Count-Min Sketches into a single sketch, with optional weights
* @param parser - The command parser
* @param destination - The name of the destination sketch
* @param source - Array of sketch names or array of sketches with weights
*/
parseCommand(parser, destination, source) {
parser.push('CMS.MERGE');
parser.pushKey(destination);
parser.push(source.length.toString());
if (isPlainSketches(source)) {
parser.pushVariadic(source);
}
else {
for (let i = 0; i < source.length; i++) {
parser.push(source[i].name);
}
parser.push('WEIGHTS');
for (let i = 0; i < source.length; i++) {
parser.push(source[i].weight.toString());
}
}
},
transformReply: undefined
};
function isPlainSketches(src) {
return typeof src[0] === 'string' || src[0] instanceof Buffer;
}
//# sourceMappingURL=MERGE.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MERGE.js","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/MERGE.ts"],"names":[],"mappings":";;AAUA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;OAKG;IACH,YAAY,CACV,MAAqB,EACrB,WAA0B,EAC1B,MAAuB;QAEvB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEtC,IAAI,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACvC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC9B,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACvC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAA;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC;AAE7B,SAAS,eAAe,CAAC,GAAoB;IAC3C,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC;AAChE,CAAC"}

View File

@@ -0,0 +1,16 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { ArrayReply, NumberReply, RedisArgument } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
declare const _default: {
readonly IS_READ_ONLY: true;
/**
* Returns the count for one or more items in a Count-Min Sketch
* @param parser - The command parser
* @param key - The name of the sketch
* @param items - One or more items to get counts for
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, items: RedisVariadicArgument) => void;
readonly transformReply: () => ArrayReply<NumberReply>;
};
export default _default;
//# sourceMappingURL=QUERY.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"QUERY.d.ts","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/QUERY.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAW,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;;;IAI3F;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,SAAS,qBAAqB;mCAKtC,WAAW,WAAW,CAAC;;AAbvE,wBAc6B"}

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
/**
* Returns the count for one or more items in a Count-Min Sketch
* @param parser - The command parser
* @param key - The name of the sketch
* @param items - One or more items to get counts for
*/
parseCommand(parser, key, items) {
parser.push('CMS.QUERY');
parser.pushKey(key);
parser.pushVariadic(items);
},
transformReply: undefined
};
//# sourceMappingURL=QUERY.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"QUERY.js","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/QUERY.ts"],"names":[],"mappings":";;AAIA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,KAA4B;QAClF,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC"}

View File

@@ -0,0 +1,70 @@
declare const _default: {
readonly INCRBY: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("./INCRBY").BfIncrByItem | import("./INCRBY").BfIncrByItem[]) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>;
};
readonly incrBy: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("./INCRBY").BfIncrByItem | import("./INCRBY").BfIncrByItem[]) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>;
};
readonly INFO: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: {
readonly 2: (this: void, reply: [import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"width">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"depth">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"count">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>], _: any, typeMapping?: import("@redis/client/dist/lib/RESP/types").TypeMapping | undefined) => import("./INFO").CmsInfoReply;
readonly 3: () => import("./INFO").CmsInfoReply;
};
};
readonly info: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: {
readonly 2: (this: void, reply: [import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"width">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"depth">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"count">, import("@redis/client/dist/lib/RESP/types").NumberReply<number>], _: any, typeMapping?: import("@redis/client/dist/lib/RESP/types").TypeMapping | undefined) => import("./INFO").CmsInfoReply;
readonly 3: () => import("./INFO").CmsInfoReply;
};
};
readonly INITBYDIM: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, width: number, depth: number) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
readonly initByDim: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, width: number, depth: number) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
readonly INITBYPROB: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, error: number, probability: number) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
readonly initByProb: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, error: number, probability: number) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
readonly MERGE: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, destination: import("@redis/client/dist/lib/RESP/types").RedisArgument, source: import("./MERGE").BfMergeSketches) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
readonly merge: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, destination: import("@redis/client/dist/lib/RESP/types").RedisArgument, source: import("./MERGE").BfMergeSketches) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
readonly QUERY: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>;
};
readonly query: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>;
};
};
export default _default;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAamC"}

View File

@@ -0,0 +1,26 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const INCRBY_1 = __importDefault(require("./INCRBY"));
const INFO_1 = __importDefault(require("./INFO"));
const INITBYDIM_1 = __importDefault(require("./INITBYDIM"));
const INITBYPROB_1 = __importDefault(require("./INITBYPROB"));
const MERGE_1 = __importDefault(require("./MERGE"));
const QUERY_1 = __importDefault(require("./QUERY"));
exports.default = {
INCRBY: INCRBY_1.default,
incrBy: INCRBY_1.default,
INFO: INFO_1.default,
info: INFO_1.default,
INITBYDIM: INITBYDIM_1.default,
initByDim: INITBYDIM_1.default,
INITBYPROB: INITBYPROB_1.default,
initByProb: INITBYPROB_1.default,
MERGE: MERGE_1.default,
merge: MERGE_1.default,
QUERY: QUERY_1.default,
query: QUERY_1.default
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/commands/count-min-sketch/index.ts"],"names":[],"mappings":";;;;;AACA,sDAA8B;AAC9B,kDAA0B;AAC1B,4DAAoC;AACpC,8DAAsC;AACtC,oDAA4B;AAC5B,oDAA4B;AAE5B,kBAAe;IACb,MAAM,EAAN,gBAAM;IACN,MAAM,EAAE,gBAAM;IACd,IAAI,EAAJ,cAAI;IACJ,IAAI,EAAE,cAAI;IACV,SAAS,EAAT,mBAAS;IACT,SAAS,EAAE,mBAAS;IACpB,UAAU,EAAV,oBAAU;IACV,UAAU,EAAE,oBAAU;IACtB,KAAK,EAAL,eAAK;IACL,KAAK,EAAE,eAAK;IACZ,KAAK,EAAL,eAAK;IACL,KAAK,EAAE,eAAK;CACoB,CAAC"}

View File

@@ -0,0 +1,18 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Adds an item to a Cuckoo Filter, creating the filter if it does not exist
* @param parser - The command parser
* @param key - The name of the Cuckoo filter
* @param item - The item to add to the filter
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, item: RedisArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
};
};
export default _default;
//# sourceMappingURL=ADD.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ADD.d.ts","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/ADD.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;;;IAKzE;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,QAAQ,aAAa;;;;;;AAR7E,wBAc6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
/**
* Adds an item to a Cuckoo Filter, creating the filter if it does not exist
* @param parser - The command parser
* @param key - The name of the Cuckoo filter
* @param item - The item to add to the filter
*/
parseCommand(parser, key, item) {
parser.push('CF.ADD');
parser.pushKey(key);
parser.push(item);
},
transformReply: generic_transformers_1.transformBooleanReply
};
//# sourceMappingURL=ADD.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ADD.js","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/ADD.ts"],"names":[],"mappings":";;AAEA,+FAA6F;AAE7F,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB;QACzE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACtB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,cAAc,EAAE,4CAAqB;CACX,CAAC"}

View File

@@ -0,0 +1,18 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Adds an item to a Cuckoo Filter only if it does not exist
* @param parser - The command parser
* @param key - The name of the Cuckoo filter
* @param item - The item to add to the filter if it doesn't exist
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, item: RedisArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
};
};
export default _default;
//# sourceMappingURL=ADDNX.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ADDNX.d.ts","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/ADDNX.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;;;IAKzE;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,QAAQ,aAAa;;;;;;AAR7E,wBAc6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
/**
* Adds an item to a Cuckoo Filter only if it does not exist
* @param parser - The command parser
* @param key - The name of the Cuckoo filter
* @param item - The item to add to the filter if it doesn't exist
*/
parseCommand(parser, key, item) {
parser.push('CF.ADDNX');
parser.pushKey(key);
parser.push(item);
},
transformReply: generic_transformers_1.transformBooleanReply
};
//# sourceMappingURL=ADDNX.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ADDNX.js","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/ADDNX.ts"],"names":[],"mappings":";;AAEA,+FAA6F;AAE7F,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB;QACzE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,cAAc,EAAE,4CAAqB;CACX,CAAC"}

View File

@@ -0,0 +1,15 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: true;
/**
* Returns the number of times an item appears in a Cuckoo Filter
* @param parser - The command parser
* @param key - The name of the Cuckoo filter
* @param item - The item to count occurrences of
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, item: RedisArgument) => void;
readonly transformReply: () => NumberReply;
};
export default _default;
//# sourceMappingURL=COUNT.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"COUNT.d.ts","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/COUNT.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;;;IAItF;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,QAAQ,aAAa;mCAK7B,WAAW;;AAb3D,wBAc6B"}

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
/**
* Returns the number of times an item appears in a Cuckoo Filter
* @param parser - The command parser
* @param key - The name of the Cuckoo filter
* @param item - The item to count occurrences of
*/
parseCommand(parser, key, item) {
parser.push('CF.COUNT');
parser.pushKey(key);
parser.push(item);
},
transformReply: undefined
};
//# sourceMappingURL=COUNT.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"COUNT.js","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/COUNT.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB;QACzE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC"}

View File

@@ -0,0 +1,18 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Removes an item from a Cuckoo Filter if it exists
* @param parser - The command parser
* @param key - The name of the Cuckoo filter
* @param item - The item to remove from the filter
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, item: RedisArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
};
};
export default _default;
//# sourceMappingURL=DEL.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DEL.d.ts","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/DEL.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;;;IAKzE;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,QAAQ,aAAa;;;;;;AAR7E,wBAc6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
/**
* Removes an item from a Cuckoo Filter if it exists
* @param parser - The command parser
* @param key - The name of the Cuckoo filter
* @param item - The item to remove from the filter
*/
parseCommand(parser, key, item) {
parser.push('CF.DEL');
parser.pushKey(key);
parser.push(item);
},
transformReply: generic_transformers_1.transformBooleanReply
};
//# sourceMappingURL=DEL.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DEL.js","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/DEL.ts"],"names":[],"mappings":";;AAEA,+FAA6F;AAE7F,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB;QACzE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACtB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,cAAc,EAAE,4CAAqB;CACX,CAAC"}

View File

@@ -0,0 +1,18 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
/**
* Checks if an item exists in a Cuckoo Filter
* @param parser - The command parser
* @param key - The name of the Cuckoo filter
* @param item - The item to check for existence
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, item: RedisArgument) => void;
readonly transformReply: {
2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
};
};
export default _default;
//# sourceMappingURL=EXISTS.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"EXISTS.d.ts","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/EXISTS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;;;IAKzE;;;;;OAKG;gDACkB,aAAa,OAAO,aAAa,QAAQ,aAAa;;;;;;AAR7E,wBAc6B"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
/**
* Checks if an item exists in a Cuckoo Filter
* @param parser - The command parser
* @param key - The name of the Cuckoo filter
* @param item - The item to check for existence
*/
parseCommand(parser, key, item) {
parser.push('CF.EXISTS');
parser.pushKey(key);
parser.push(item);
},
transformReply: generic_transformers_1.transformBooleanReply
};
//# sourceMappingURL=EXISTS.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"EXISTS.js","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/EXISTS.ts"],"names":[],"mappings":";;AAEA,+FAA6F;AAE7F,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB;QACzE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,cAAc,EAAE,4CAAqB;CACX,CAAC"}

View File

@@ -0,0 +1,51 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply, TuplesToMapReply, SimpleStringReply, TypeMapping } from '@redis/client/dist/lib/RESP/types';
export type CfInfoReplyMap = TuplesToMapReply<[
[
SimpleStringReply<'Size'>,
NumberReply
],
[
SimpleStringReply<'Number of buckets'>,
NumberReply
],
[
SimpleStringReply<'Number of filters'>,
NumberReply
],
[
SimpleStringReply<'Number of items inserted'>,
NumberReply
],
[
SimpleStringReply<'Number of items deleted'>,
NumberReply
],
[
SimpleStringReply<'Bucket size'>,
NumberReply
],
[
SimpleStringReply<'Expansion rate'>,
NumberReply
],
[
SimpleStringReply<'Max iterations'>,
NumberReply
]
]>;
declare const _default: {
readonly IS_READ_ONLY: true;
/**
* Returns detailed information about a Cuckoo Filter including size, buckets, filters count, items statistics and configuration
* @param parser - The command parser
* @param key - The name of the Cuckoo filter to get information about
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument) => void;
readonly transformReply: {
readonly 2: (this: void, reply: [SimpleStringReply<"Size">, NumberReply<number>, SimpleStringReply<"Number of buckets">, NumberReply<number>, SimpleStringReply<"Number of filters">, NumberReply<number>, SimpleStringReply<"Number of items inserted">, NumberReply<number>, SimpleStringReply<"Number of items deleted">, NumberReply<number>, SimpleStringReply<"Bucket size">, NumberReply<number>, SimpleStringReply<"Expansion rate">, NumberReply<number>, SimpleStringReply<"Max iterations">, NumberReply<number>], _: any, typeMapping?: TypeMapping) => CfInfoReplyMap;
readonly 3: () => CfInfoReplyMap;
};
};
export default _default;
//# sourceMappingURL=INFO.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"INFO.d.ts","sourceRoot":"","sources":["../../../../lib/commands/cuckoo/INFO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,WAAW,EAAE,gBAAgB,EAA2B,iBAAiB,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAGnK,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC;IAC5C;QAAC,iBAAiB,CAAC,MAAM,CAAC;QAAE,WAAW;KAAC;IACxC;QAAC,iBAAiB,CAAC,mBAAmB,CAAC;QAAE,WAAW;KAAC;IACrD;QAAC,iBAAiB,CAAC,mBAAmB,CAAC;QAAE,WAAW;KAAC;IACrD;QAAC,iBAAiB,CAAC,0BAA0B,CAAC;QAAE,WAAW;KAAC;IAC5D;QAAC,iBAAiB,CAAC,yBAAyB,CAAC;QAAE,WAAW;KAAC;IAC3D;QAAC,iBAAiB,CAAC,aAAa,CAAC;QAAE,WAAW;KAAC;IAC/C;QAAC,iBAAiB,CAAC,gBAAgB,CAAC;QAAE,WAAW;KAAC;IAClD;QAAC,iBAAiB,CAAC,gBAAgB,CAAC;QAAE,WAAW;KAAC;CACnD,CAAC,CAAC;;;IAID;;;;OAIG;gDACkB,aAAa,OAAO,aAAa;;4hBAKiB,WAAW;;;;AAZpF,wBAiB6B"}

View File

@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const bloom_1 = require("../bloom");
exports.default = {
IS_READ_ONLY: true,
/**
* Returns detailed information about a Cuckoo Filter including size, buckets, filters count, items statistics and configuration
* @param parser - The command parser
* @param key - The name of the Cuckoo filter to get information about
*/
parseCommand(parser, key) {
parser.push('CF.INFO');
parser.pushKey(key);
},
transformReply: {
2: (reply, _, typeMapping) => {
return (0, bloom_1.transformInfoV2Reply)(reply, typeMapping);
},
3: undefined
}
};
//# sourceMappingURL=INFO.js.map

Some files were not shown because too many files have changed in this diff Show More