falkordb
Version:
A FalkorDB javascript library
58 lines (57 loc) • 4.07 kB
TypeScript
import { Client } from "./client";
import { ConstraintType, EntityType } from "../graph";
import { RedisCommandArgument, RedisFunctions, RedisScripts } from "@redis/client/dist/lib/commands";
import commands, { QueryOptions } from "../commands";
import { RedisClusterType } from "@redis/client";
import FalkorDB from "../falkordb";
import { SingleGraphConnection } from "./single";
export type ClusterGraphConnection = RedisClusterType<{
falkordb: typeof commands;
}, RedisFunctions, RedisScripts>;
/**
* A client that connects to a Redis Cluster.
*/
export declare class Cluster implements Client {
#private;
constructor(client: SingleGraphConnection);
getConnection(): Promise<import("@redis/client").RedisClientType<{
falkordb: typeof commands;
}, RedisFunctions, RedisScripts>>;
init(falkordb: FalkorDB): Promise<void>;
query<T>(graph: string, query: RedisCommandArgument, options?: QueryOptions, compact?: boolean): Promise<{
headers: undefined;
data: undefined;
metadata: string[];
} | {
headers: string[];
data: (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[];
metadata: string[];
}>;
roQuery<T>(graph: string, query: RedisCommandArgument, options?: QueryOptions, compact?: boolean): Promise<{
headers: undefined;
data: undefined;
metadata: string[];
} | {
headers: string[];
data: (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[];
metadata: string[];
}>;
delete(graph: string): Promise<void>;
explain(graph: string, query: string): Promise<string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined>;
list(): Promise<Array<string>>;
configGet(configKey: string): Promise<(string | number)[] | (string | number)[][]>;
configSet(configKey: string, value: number | string): Promise<void>;
info(section?: string): Promise<(string | string[])[]>;
copy<_T>(srcGraph: string, destGraph: string): Promise<"OK">;
slowLog(graph: string): Promise<{
timestamp: Date;
command: string;
query: string;
took: number;
}[]>;
constraintCreate(graph: string, constraintType: ConstraintType, entityType: EntityType, label: string, ...properties: string[]): Promise<void>;
constraintDrop(graph: string, constraintType: ConstraintType, entityType: EntityType, label: string, ...properties: string[]): Promise<void>;
profile<_T>(graph: string, query: string): Promise<string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | (string | number | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined>;
quit(): Promise<void>;
disconnect(): Promise<void>;
}