You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
WIP
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands';
|
||||
import { pushVerdictArgument, transformTuplesReply } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { pushVariadicArgument, transformTuplesReply } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { Params, PropertyName, pushArgumentsWithLength, pushParamsArgs, pushSortByArguments, SortByProperty } from '.';
|
||||
|
||||
export enum AggregateSteps {
|
||||
@@ -170,7 +170,7 @@ export function pushAggregatehOptions(
|
||||
if (!step.properties) {
|
||||
args.push('0');
|
||||
} else {
|
||||
pushVerdictArgument(args, step.properties);
|
||||
pushVariadicArgument(args, step.properties);
|
||||
}
|
||||
|
||||
if (Array.isArray(step.REDUCE)) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { pushOptionalVerdictArgument } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { pushOptionalVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { RedisSearchLanguages, PropertyName, RediSearchSchema, pushSchema } from '.';
|
||||
|
||||
interface CreateOptions {
|
||||
@@ -27,7 +27,7 @@ export function transformArguments(index: string, schema: RediSearchSchema, opti
|
||||
args.push('ON', options.ON);
|
||||
}
|
||||
|
||||
pushOptionalVerdictArgument(args, 'PREFIX', options?.PREFIX);
|
||||
pushOptionalVariadicArgument(args, 'PREFIX', options?.PREFIX);
|
||||
|
||||
if (options?.FILTER) {
|
||||
args.push('FILTER', options.FILTER);
|
||||
@@ -81,7 +81,7 @@ export function transformArguments(index: string, schema: RediSearchSchema, opti
|
||||
args.push('SKIPINITIALSCAN');
|
||||
}
|
||||
|
||||
pushOptionalVerdictArgument(args, 'STOPWORDS', options?.STOPWORDS);
|
||||
pushOptionalVariadicArgument(args, 'STOPWORDS', options?.STOPWORDS);
|
||||
args.push('SCHEMA');
|
||||
pushSchema(args, schema);
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { RedisCommandArguments } from '@redis/client/dist/lib/commands';
|
||||
import { pushVerdictArguments } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
|
||||
export function transformArguments(dictionary: string, term: string | Array<string>): RedisCommandArguments {
|
||||
return pushVerdictArguments(['FT.DICTADD', dictionary], term);
|
||||
return pushVariadicArguments(['FT.DICTADD', dictionary], term);
|
||||
}
|
||||
|
||||
export declare function transformReply(): number;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { RedisCommandArguments } from '@redis/client/dist/lib/commands';
|
||||
import { pushVerdictArguments } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
|
||||
export function transformArguments(dictionary: string, term: string | Array<string>): RedisCommandArguments {
|
||||
return pushVerdictArguments(['FT.DICTDEL', dictionary], term);
|
||||
return pushVariadicArguments(['FT.DICTDEL', dictionary], term);
|
||||
}
|
||||
|
||||
export declare function transformReply(): number;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { pushVerdictArguments } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { RedisCommandArguments } from '@redis/client/dist/lib/commands';
|
||||
|
||||
interface SynUpdateOptions {
|
||||
@@ -17,7 +17,7 @@ export function transformArguments(
|
||||
args.push('SKIPINITIALSCAN');
|
||||
}
|
||||
|
||||
return pushVerdictArguments(args, terms);
|
||||
return pushVariadicArguments(args, terms);
|
||||
}
|
||||
|
||||
export declare function transformReply(): 'OK';
|
||||
|
@@ -32,7 +32,7 @@ import * as SYNDUMP from './SYNDUMP';
|
||||
import * as SYNUPDATE from './SYNUPDATE';
|
||||
import * as TAGVALS from './TAGVALS';
|
||||
import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands';
|
||||
import { pushOptionalVerdictArgument, pushVerdictArgument } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { pushOptionalVariadicArgument, pushVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { SearchOptions } from './SEARCH';
|
||||
|
||||
export default {
|
||||
@@ -411,9 +411,9 @@ export function pushSearchOptions(
|
||||
// args.push('WITHPAYLOADS');
|
||||
// }
|
||||
|
||||
pushOptionalVerdictArgument(args, 'INKEYS', options?.INKEYS);
|
||||
pushOptionalVerdictArgument(args, 'INFIELDS', options?.INFIELDS);
|
||||
pushOptionalVerdictArgument(args, 'RETURN', options?.RETURN);
|
||||
pushOptionalVariadicArgument(args, 'INKEYS', options?.INKEYS);
|
||||
pushOptionalVariadicArgument(args, 'INFIELDS', options?.INFIELDS);
|
||||
pushOptionalVariadicArgument(args, 'RETURN', options?.RETURN);
|
||||
|
||||
if (options?.SUMMARIZE) {
|
||||
args.push('SUMMARIZE');
|
||||
@@ -421,7 +421,7 @@ export function pushSearchOptions(
|
||||
if (typeof options.SUMMARIZE === 'object') {
|
||||
if (options.SUMMARIZE.FIELDS) {
|
||||
args.push('FIELDS');
|
||||
pushVerdictArgument(args, options.SUMMARIZE.FIELDS);
|
||||
pushVariadicArgument(args, options.SUMMARIZE.FIELDS);
|
||||
}
|
||||
|
||||
if (options.SUMMARIZE.FRAGS) {
|
||||
@@ -444,7 +444,7 @@ export function pushSearchOptions(
|
||||
if (typeof options.HIGHLIGHT === 'object') {
|
||||
if (options.HIGHLIGHT.FIELDS) {
|
||||
args.push('FIELDS');
|
||||
pushVerdictArgument(args, options.HIGHLIGHT.FIELDS);
|
||||
pushVariadicArgument(args, options.HIGHLIGHT.FIELDS);
|
||||
}
|
||||
|
||||
if (options.HIGHLIGHT.TAGS) {
|
||||
|
@@ -18,12 +18,12 @@
|
||||
"devDependencies": {
|
||||
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
||||
"@redis/test-utils": "*",
|
||||
"@types/node": "^18.14.1",
|
||||
"@types/node": "^18.15.10",
|
||||
"nyc": "^15.1.0",
|
||||
"release-it": "^15.6.0",
|
||||
"release-it": "^15.9.3",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-node": "^10.9.1",
|
||||
"typedoc": "^0.23.25",
|
||||
"typescript": "^4.9.5"
|
||||
"typedoc": "^0.23.28",
|
||||
"typescript": "^5.0.2"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user