@ultipa-graph/ultipa-driver 6.0.13 → 6.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -347,27 +347,44 @@ export declare class GqldbClient {
347
347
  /** Stop a running task by ID */
348
348
  stopTask(taskId: string, config?: QueryConfig): Promise<Response>;
349
349
  /**
350
- * Insert nodes using GQL INSERT syntax with RETURN clause.
351
- * GQL: INSERT (n0:Label {p1: v1}), (n1:Label {p2: v2}) RETURN n0, n1
352
- * When config.insertType is InsertType.Overwrite, uses INSERT OVERWRITE syntax.
353
- * If NodeData.id is set (non-empty), includes it as _id property in the GQL.
354
- * Returns the raw Response containing the inserted nodes in columns n0, n1, etc.
350
+ * Insert nodes backward-compatible overloaded entry point.
355
351
  *
356
- * @param nodes Nodes to insert.
357
- * @param config Optional InsertConfig. Supports per-call graphName and insertType.
352
+ * Two call shapes are accepted; the runtime dispatches on the first
353
+ * argument's type:
354
+ *
355
+ * 1. `insertNodes(graphName: string, nodes, config?)` — original
356
+ * 6.0.0 signature, routes through the bulk-import gRPC path
357
+ * (`DataService.InsertNodes`). Returns `InsertNodesResult` with
358
+ * gRPC-level metadata. Preserves source compatibility for
359
+ * callers written against 6.0.0 (e.g. gqldb-manager).
360
+ *
361
+ * 2. `insertNodes(nodes, config?)` — convenience GQL emitter (added
362
+ * after 6.0.0). Synthesizes
363
+ * `INSERT (n0:Label {...}), (n1:Label {...}) RETURN n0, n1`,
364
+ * with `INSERT OVERWRITE` when `config.insertType` is
365
+ * `InsertType.Overwrite`. Returns the raw `Response`.
366
+ * `NodeData.id`, when set, is emitted as the `_id` property.
358
367
  */
368
+ insertNodes(graphName: string, nodes: NodeData[], config?: InsertNodesConfig): Promise<InsertNodesResult>;
359
369
  insertNodes(nodes: NodeData[], config?: InsertConfig): Promise<Response>;
360
370
  /**
361
- * Insert edges using GQL INSERT syntax with RETURN clause.
362
- * Each edge is inserted individually using MATCH + INSERT to resolve node IDs.
363
- * GQL: MATCH (src WHERE id(src) = 'from'), (dst WHERE id(dst) = 'to')
364
- * INSERT (src)-[e0:Label {p1: v1}]->(dst) RETURN e0
365
- * When config.insertType is InsertType.Overwrite, uses INSERT OVERWRITE syntax.
366
- * Returns a merged Response containing all inserted edges in columns e0, e1, etc.
371
+ * Insert edges backward-compatible overloaded entry point.
372
+ *
373
+ * Two call shapes are accepted; the runtime dispatches on the first
374
+ * argument's type:
375
+ *
376
+ * 1. `insertEdges(graphName: string, edges, config?)` original
377
+ * 6.0.0 signature, routes through the bulk-import gRPC path
378
+ * (`DataService.InsertEdges`). Returns `InsertEdgesResult` with
379
+ * gRPC-level metadata. Preserves source compatibility for
380
+ * 6.0.0 callers.
367
381
  *
368
- * @param edges Edges to insert.
369
- * @param config Optional InsertConfig. Supports per-call graphName and insertType.
382
+ * 2. `insertEdges(edges, config?)` convenience GQL emitter
383
+ * (added after 6.0.0). Per edge synthesizes
384
+ * `MATCH (src WHERE id(src) = 'from'), (dst WHERE id(dst) = 'to') INSERT (src)-[e0:Label {...}]->(dst) RETURN e0`.
385
+ * Returns a merged `Response` with columns `e0, e1, ...`.
370
386
  */
387
+ insertEdges(graphName: string, edges: EdgeData[], config?: InsertEdgesConfig): Promise<InsertEdgesResult>;
371
388
  insertEdges(edges: EdgeData[], config?: InsertConfig): Promise<Response>;
372
389
  /** Return currently running processes (queries) */
373
390
  top(config?: QueryConfig): Promise<ProcessInfo[]>;