@grafeo-db/wasm-lite 0.5.18 → 0.5.19

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/grafeo_wasm.d.ts CHANGED
@@ -97,6 +97,30 @@ export class Database {
97
97
  * ```
98
98
  */
99
99
  exportSnapshot(): Uint8Array;
100
+ /**
101
+ * Batch-imports LPG (Labeled Property Graph) data from a structured object.
102
+ *
103
+ * Nodes are created first, then edges. Edge `source`/`target` fields are
104
+ * zero-based indexes into the `nodes` array, so you can reference newly
105
+ * created nodes without knowing their database IDs.
106
+ *
107
+ * Returns `{ nodes: number, edges: number }` with the counts of created
108
+ * entities.
109
+ *
110
+ * ```js
111
+ * const result = db.importLpg({
112
+ * nodes: [
113
+ * { labels: ["Person"], properties: { name: "Alix", age: 30 } },
114
+ * { labels: ["Person"], properties: { name: "Gus", age: 25 } },
115
+ * ],
116
+ * edges: [
117
+ * { source: 0, target: 1, type: "KNOWS", properties: { since: 2020 } }
118
+ * ]
119
+ * });
120
+ * // { nodes: 2, edges: 1 }
121
+ * ```
122
+ */
123
+ importLpg(data: any): any;
100
124
  /**
101
125
  * Creates a database from a binary snapshot.
102
126
  *
Binary file
@@ -10,6 +10,7 @@ export const database_executeWithLanguage: (a: number, b: number, c: number, d:
10
10
  export const database_executeWithLanguageAndParams: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
11
11
  export const database_executeWithParams: (a: number, b: number, c: number, d: number, e: number) => void;
12
12
  export const database_exportSnapshot: (a: number, b: number) => void;
13
+ export const database_importLpg: (a: number, b: number, c: number) => void;
13
14
  export const database_importSnapshot: (a: number, b: number, c: number) => void;
14
15
  export const database_new: (a: number) => void;
15
16
  export const database_nodeCount: (a: number) => number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@grafeo-db/wasm-lite",
3
3
  "type": "module",
4
- "version": "0.5.18",
4
+ "version": "0.5.19",
5
5
  "description": "WebAssembly bindings for Grafeo - GQL-only lightweight variant",
6
6
  "keywords": [
7
7
  "graph",