UNPKG

@ultipa-graph/ultipa-node-sdk

Version:

NodeJS SDK for ultipa-server 4.0

58 lines (57 loc) 3.24 kB
import { Connection } from "./extra/connection"; import { RequestType, ResponseType, ULTIPA } from "../types"; import { EntityTable } from "../proto/ultipa_pb"; export declare class ConnectionFinal extends Connection { testConnectResult: boolean; setGraph(graphName: string): void; clusterTest(commonReq?: RequestType.RequestConfig, timeoutSeconds?: number): Promise<ULTIPA.RaftPeerInfo[]>; /** * 集群信息 */ clusterInfo(commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<{ raft: boolean; infos: ResponseType.ClusterInfo[]; }>>; /** * 拷贝数据集 */ copyGraph(req: RequestType.CopyGraph, commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<any>>; /** 卸载算法 */ uninstallAlgo(algoName: string, config?: RequestType.RequestConfig): Promise<ULTIPA.Response<boolean>>; /** 卸载算法 */ uninstallExta(extaName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<boolean>>; /** 安装算法 */ installAlgo(soFilePath: string, infoFilePath: string, config?: RequestType.RequestConfig): Promise<ULTIPA.Response<boolean>>; /** 安装算法 */ installExta(soFilePath: string, infoFilePath: string, config?: RequestType.RequestConfig): Promise<ULTIPA.Response<boolean>>; /** 安装算法 */ private installAlgoAio; private _installAlgo; insertNodesBatchBySchema(schema: ULTIPA.Schema, rows: ULTIPA.Node[], config: RequestType.InsertRequestConfig): Promise<ULTIPA.Response<ResponseType.InsertNodes>>; insertNodesBatchAuto(rows: ULTIPA.Node[], config?: RequestType.InsertRequestConfig): Promise<ULTIPA.Response<ResponseType.InsertNodes>>; insertNodesBatch(table: EntityTable, config?: RequestType.InsertRequestConfig): Promise<ULTIPA.Response<ResponseType.InsertNodes>>; /** * 插入大量的点 */ insertHugeNodes(req: RequestType.InsertHugeNodes, config?: RequestType.InsertRequestConfig): Promise<ULTIPA.Response<ResponseType.InsertNodes>>; insertEdgesBatch(table: EntityTable, config?: RequestType.InsertRequestConfig): Promise<ULTIPA.Response<ResponseType.InsertEdges>>; validEdgeRows(rows: ULTIPA.Edge[]): { ok: boolean; msg?: string; failedIndex?: number; }; insertEdgesBatchBySchema(schema: ULTIPA.Schema, rows: ULTIPA.Edge[], config: RequestType.InsertRequestConfig): Promise<ULTIPA.Response<ResponseType.InsertEdges>>; insertEdgesBatchAuto(rows: ULTIPA.Edge[], config: RequestType.InsertRequestConfig): Promise<ULTIPA.Response<ResponseType.InsertEdges>>; /** * 插入大量的边 */ insertHugeEdges(req: RequestType.InsertHugeEdges, config?: RequestType.InsertRequestConfig): Promise<ULTIPA.Response<ResponseType.InsertEdges>>; /** * 下载所有算法文件 * @param req * @param commonReq */ downloadAllAlgoResultFile(taskId: string, cb: (chunk: Uint8Array | string, fileName: string) => void, requestConfig: RequestType.CommonStreamRequire): Promise<any[]>; /** 创建点或者边的schema */ createSchema(schema: ULTIPA.Schema, isCreateProperties?: boolean, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<null>>; }