UNPKG

falkordb

Version:
44 lines (43 loc) 2.81 kB
import { RedisCommandArgument } from "@redis/client/dist/lib/commands"; import { QueryOptions } from "./commands"; import { QueryReply } from "./commands/QUERY"; import { ConstraintType, EntityType } from "./commands/CONSTRAINT_CREATE"; import { Client } from "./clients/client"; import { MemoryUsageOptions } from "./commands/MEMORY_USAGE"; export { ConstraintType, EntityType }; export type GraphReply<T> = Omit<QueryReply, "headers" | "data"> & { data?: Array<T>; }; export default class Graph { #private; constructor(client: Client, name: string); query<T>(query: RedisCommandArgument, options?: QueryOptions): Promise<GraphReply<T>>; roQuery<T>(query: RedisCommandArgument, options?: QueryOptions): Promise<GraphReply<T>>; delete(): Promise<void>; explain(query: string): Promise<any>; profile(query: string): Promise<any>; memoryUsage(options?: MemoryUsageOptions): Promise<import("./commands/MEMORY_USAGE").MemoryUsageReply>; slowLog(): Promise<{ timestamp: Date; command: string; query: string; took: number; }[]>; constraintCreate(constraintType: ConstraintType, entityType: EntityType, label: string, ...properties: string[]): Promise<void>; constraintDrop(constraintType: ConstraintType, entityType: EntityType, label: string, ...properties: string[]): Promise<void>; copy(destGraph: string): Promise<any>; createTypedIndex(idxType: string, entityType: "NODE" | "EDGE", label: string, properties: string[], options?: Record<string, string | number | boolean>): Promise<QueryReply>; createNodeRangeIndex(label: string, ...properties: string[]): Promise<QueryReply>; createNodeFulltextIndex(label: string, ...properties: string[]): Promise<QueryReply>; createNodeVectorIndex(label: string, dim?: number, similarityFunction?: string, ...properties: string[]): Promise<QueryReply>; createEdgeRangeIndex(label: string, ...properties: string[]): Promise<QueryReply>; createEdgeFulltextIndex(label: string, ...properties: string[]): Promise<QueryReply>; createEdgeVectorIndex(label: string, dim?: number, similarityFunction?: string, ...properties: string[]): Promise<QueryReply>; dropTypedIndex(idxType: string, entityType: "NODE" | "EDGE", label: string, attribute: string): Promise<QueryReply>; dropNodeRangeIndex(label: string, attribute: string): Promise<QueryReply>; dropNodeFulltextIndex(label: string, attribute: string): Promise<QueryReply>; dropNodeVectorIndex(label: string, attribute: string): Promise<QueryReply>; dropEdgeRangeIndex(label: string, attribute: string): Promise<QueryReply>; dropEdgeFulltextIndex(label: string, attribute: string): Promise<QueryReply>; dropEdgeVectorIndex(label: string, attribute: string): Promise<QueryReply>; }