You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
add buffer support to a bunch of commands
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { RedisCommandArguments } from '@node-redis/client/dist/lib/commands';
|
||||
import { pushVerdictArgument, transformReplyTuples, TuplesObject } from '@node-redis/client/dist/lib/commands/generic-transformers';
|
||||
import { pushVerdictArgument, transformReplyStringTuples } from '@node-redis/client/dist/lib/commands/generic-transformers';
|
||||
import { AggregateReply, PropertyName, pushArgumentsWithLength, pushSortByArguments, SortByProperty } from '.';
|
||||
|
||||
export enum AggregateSteps {
|
||||
@@ -125,8 +125,8 @@ export interface AggregateOptions {
|
||||
}
|
||||
|
||||
export function transformArguments(
|
||||
index: string,
|
||||
query: string,
|
||||
index: string,
|
||||
query: string,
|
||||
options?: AggregateOptions
|
||||
): RedisCommandArguments {
|
||||
|
||||
@@ -277,10 +277,10 @@ export type AggregateRawReply = [
|
||||
];
|
||||
|
||||
export function transformReply(rawReply: AggregateRawReply): AggregateReply {
|
||||
const results: Array<TuplesObject> = [];
|
||||
const results: Array<Record<string, string>> = [];
|
||||
for (let i = 1; i < rawReply.length; i++) {
|
||||
results.push(
|
||||
transformReplyTuples(rawReply[i] as Array<string>)
|
||||
transformReplyStringTuples(rawReply[i] as Array<string>)
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { RedisCommandArguments } from '@node-redis/client/dist/lib/commands';
|
||||
import { transformReplyTuples } from '@node-redis/client/dist/lib/commands/generic-transformers';
|
||||
import { transformReplyStringTuples } from '@node-redis/client/dist/lib/commands/generic-transformers';
|
||||
import { pushSearchOptions, RedisSearchLanguages, PropertyName, SortByProperty, SearchReply } from '.';
|
||||
|
||||
export const FIRST_KEY_INDEX = 1;
|
||||
@@ -76,7 +76,7 @@ export function transformReply(reply: SearchRawReply): SearchReply {
|
||||
id: reply[i],
|
||||
value: tuples.length === 2 && tuples[0] === '$' ?
|
||||
JSON.parse(tuples[1]) :
|
||||
transformReplyTuples(tuples)
|
||||
transformReplyStringTuples(tuples)
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@ import * as SYNDUMP from './SYNDUMP';
|
||||
import * as SYNUPDATE from './SYNUPDATE';
|
||||
import * as TAGVALS from './TAGVALS';
|
||||
import { RedisCommandArguments } from '@node-redis/client/dist/lib/commands';
|
||||
import { pushOptionalVerdictArgument, pushVerdictArgument, TuplesObject } from '@node-redis/client/dist/lib/commands/generic-transformers';
|
||||
import { pushOptionalVerdictArgument, pushVerdictArgument } from '@node-redis/client/dist/lib/commands/generic-transformers';
|
||||
import { SearchOptions } from './SEARCH';
|
||||
|
||||
export default {
|
||||
@@ -398,7 +398,7 @@ export interface SearchReply {
|
||||
|
||||
export interface AggregateReply {
|
||||
total: number;
|
||||
results: Array<TuplesObject>;
|
||||
results: Array<Record<string, string>>;
|
||||
}
|
||||
|
||||
export interface ProfileOptions {
|
||||
|
Reference in New Issue
Block a user