@ultipa-graph/ultipa-driver
Version:
NodeJS SDK for ultipa-server 5.2
59 lines (58 loc) • 2.92 kB
TypeScript
import { EntityTable } from "../../proto/ultipa_pb";
import { InsertRequestConfig, InsertResponse, Edge, Response, Schema, Node } from "../../types/types";
import { SchemaExra } from "./schema.extra";
export declare class BatchInsertExtra extends SchemaExra {
/**
* Inserts new nodes of a schema into the current graph through gRPC. The properties within the node values must be consistent with those declared in the schema structure.
* @param table
* @param config
* @returns
*/
insertNodesBatch(table: EntityTable, config?: InsertRequestConfig): Promise<InsertResponse>;
/**
* Inserts new nodes of a schema into the current graph through gRPC. The properties within the node values must be consistent with those declared in the schema structure.
* @param schema
* @param nodes
* @param config
* @returns InsertResponse
*/
insertNodesBatchBySchema(schema: Schema, nodes: Node[], config: InsertRequestConfig): Promise<InsertResponse>;
/**
* Insert node list to shcem by schemaName
*/
insertNodes(schemaName: string, nodes: Node[], config?: InsertRequestConfig): Promise<Response>;
/**
* Insert edge list to shcem by schemaName
*/
insertEdges(schemaName: string, edges: Edge[], config?: InsertRequestConfig): Promise<Response>;
/**
* Inserts new nodes of one or multiple schemas to the current graph through gRPC. The properties within node values must be consistent with those defined in the corresponding schema structure.
* @param nodes
* @param config
* @returns
*/
insertNodesBatchAuto(nodes: Node[], config: InsertRequestConfig): Promise<Map<string, InsertResponse>>;
/**
* Inserts new edges of a schema into the current graph through gRPC. The properties within the edge values must be consistent with those declared in the schema structure.
* @param table
* @param config
* @returns
*/
insertEdgesBatch(table: EntityTable, config?: InsertRequestConfig): Promise<InsertResponse>;
/**
* Inserts new edges of a schema into the current graph through gRPC. The properties within the edge values must be consistent with those declared in the schema structure.
*/
insertEdgesBatchBySchema(schema: Schema, edges: Edge[], config: InsertRequestConfig): Promise<InsertResponse>;
validEdgeRows(rows: Edge[]): {
ok: boolean;
msg?: string;
failedIndex?: number;
};
/**
* Inserts new edges of one or multiple schemas to the current graph through gRPC. The properties within edge values must be consistent with those defined in the corresponding schema structure.
* @param edges
* @param config
* @returns
*/
insertEdgesBatchAuto(edges: Edge[], config: InsertRequestConfig): Promise<Map<string, InsertResponse>>;
}