UNPKG

falkordb

Version:
53 lines (52 loc) 3.91 kB
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 { RedisClientType } from "@redis/client"; import FalkorDB from "../falkordb"; export type SingleGraphConnection = RedisClientType<{ falkordb: typeof commands; }, RedisFunctions, RedisScripts>; export declare class Single implements Client { #private; protected client: SingleGraphConnection; constructor(client: SingleGraphConnection); 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>; 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>; list(): Promise<string[]>; configGet(configKey: string): Promise<(string | number)[] | (string | number)[][]>; configSet(configKey: string, value: number | string): Promise<void>; info(section?: string): Promise<(string | string[])[]>; 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>; copy<_T>(srcGraph: string, destGraph: string): Promise<"OK">; quit(): Promise<void>; disconnect(): Promise<void>; getConnection(): Promise<SingleGraphConnection>; }