@wiscale/velesdb-wasm 3.2.1 → 3.4.0
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/README.md +38 -8
- package/package.json +1 -1
- package/velesdb_wasm.d.ts +3 -3
- package/velesdb_wasm.js +24 -12
- package/velesdb_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -281,7 +281,11 @@ The WASM build is optimized for client-side use cases but has some limitations c
|
|
|
281
281
|
| Knowledge Graph (nodes, edges, traversal) | ✅ | ✅ |
|
|
282
282
|
| Agent Memory (SemanticMemory) | ✅ | ✅ |
|
|
283
283
|
| VelesQL parsing and validation | ✅ | ✅ |
|
|
284
|
-
| VelesQL query execution | ✅ | ✅ |
|
|
284
|
+
| VelesQL query execution | ✅ (see carve-outs below) | ✅ |
|
|
285
|
+
| Column projection / aliases / window functions | ✅ | ✅ |
|
|
286
|
+
| Aggregate `ORDER BY` (over a GROUP BY) | ✅ | ✅ |
|
|
287
|
+
| Machine-readable error codes (`VELES-*`) | ✅ | ✅ |
|
|
288
|
+
| `EXPLAIN` (core plan vocabulary) | ✅ | ✅ |
|
|
285
289
|
| JOIN operations | ✅ (INNER, LEFT) | ✅ |
|
|
286
290
|
| Aggregations (GROUP BY / HAVING) | ✅ | ✅ |
|
|
287
291
|
| Set operations (UNION / INTERSECT / EXCEPT) | ✅ | ✅ |
|
|
@@ -295,14 +299,40 @@ The WASM build is optimized for client-side use cases but has some limitations c
|
|
|
295
299
|
VelesQL parsing, validation, **and execution** are all available in WASM. You can
|
|
296
300
|
parse queries and inspect their AST client-side, and you can run queries against
|
|
297
301
|
a `WasmDatabase` via `executeQuery()`. The single-collection executor supports
|
|
298
|
-
`SELECT` (with `WHERE`, `NEAR`, `similarity()`),
|
|
299
|
-
|
|
302
|
+
`SELECT` (with `WHERE`, `NEAR`, `similarity()`), **column projection / aliases /
|
|
303
|
+
window functions** (`ROW_NUMBER`/`RANK`/`DENSE_RANK`), `GROUP BY`/`HAVING`,
|
|
304
|
+
aggregations, `ORDER BY` (payload columns, `similarity()`, arithmetic
|
|
305
|
+
expressions, and aggregate ORDER BY over a GROUP BY), a default `LIMIT 10`,
|
|
306
|
+
`UNION`/`INTERSECT`/`EXCEPT`, `INNER`/`LEFT JOIN`,
|
|
300
307
|
`INSERT`/`UPSERT`/`UPDATE`/`DELETE`, DDL, and 1–2 hop `MATCH` graph traversal.
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
308
|
+
`EXPLAIN` uses the same plan vocabulary as the REST server (core
|
|
309
|
+
`QueryPlan::to_plan_steps()`), and execution errors carry machine-readable
|
|
310
|
+
`VELES-*` codes.
|
|
311
|
+
|
|
312
|
+
#### Features that require the REST server (rejected with a descriptive error)
|
|
313
|
+
|
|
314
|
+
These are **loud rejections**, not silent no-ops — WASM never returns a
|
|
315
|
+
wrong-but-quiet result for an unsupported shape:
|
|
316
|
+
|
|
317
|
+
- **Cross-collection `MATCH` (`@collection`)** — needs Database-level routing.
|
|
318
|
+
- **`MATCH` traversals beyond 2 hops.**
|
|
319
|
+
- **`RIGHT` / `FULL JOIN`** and **`TRAIN QUANTIZER`.**
|
|
320
|
+
- **`LET` score bindings** — `LET x = ... SELECT ...` is rejected (`LET bindings
|
|
321
|
+
are not supported in WASM`).
|
|
322
|
+
- **Scalar subqueries** — `WHERE x = (SELECT ...)` is rejected (`Subqueries are
|
|
323
|
+
not supported in WASM`).
|
|
324
|
+
- **`USING FUSION(strategy='weighted'|'rsf')` on a single-vector `NEAR`** — WASM
|
|
325
|
+
has no BM25/graph branch to fuse against, so these weight-sensitive strategies
|
|
326
|
+
are rejected (use `rrf`/`maximum`/`average`, or a metadata filter without
|
|
327
|
+
`FUSION`). On a multi-vector `NEAR_FUSED` query the strategy is **not**
|
|
328
|
+
rejected, but only `rrf` / `average` / `maximum` are honored — `weighted` /
|
|
329
|
+
`rsf` silently fall back to RRF (matching core's `fused_config_to_strategy`).
|
|
330
|
+
- **`ORDER BY similarity(field, $v)`** (a named/secondary vector) — WASM stores
|
|
331
|
+
only the primary vector, so the named-vector form is rejected on both the
|
|
332
|
+
`SELECT` and `MATCH` paths. Use `ORDER BY similarity()` (the search score) or a
|
|
333
|
+
payload column. The `MATCH` path performs no vector scoring, so it additionally
|
|
334
|
+
rejects bare `similarity()` and arithmetic `ORDER BY` (order by `depth` or
|
|
335
|
+
`alias.property` instead).
|
|
306
336
|
|
|
307
337
|
```javascript
|
|
308
338
|
import { VelesQL } from '@wiscale/velesdb-wasm';
|
package/package.json
CHANGED
package/velesdb_wasm.d.ts
CHANGED
|
@@ -1390,9 +1390,9 @@ export interface InitOutput {
|
|
|
1390
1390
|
readonly graphnode_id: (a: number) => bigint;
|
|
1391
1391
|
readonly vectorstore_dimension: (a: number) => number;
|
|
1392
1392
|
readonly wasmdatabase_collection_count: (a: number) => number;
|
|
1393
|
-
readonly
|
|
1394
|
-
readonly
|
|
1395
|
-
readonly
|
|
1393
|
+
readonly __wasm_bindgen_func_elem_1308: (a: number, b: number, c: number, d: number) => void;
|
|
1394
|
+
readonly __wasm_bindgen_func_elem_1324: (a: number, b: number, c: number, d: number) => void;
|
|
1395
|
+
readonly __wasm_bindgen_func_elem_438: (a: number, b: number, c: number) => void;
|
|
1396
1396
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
1397
1397
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
1398
1398
|
readonly __wbindgen_export3: (a: number) => void;
|
package/velesdb_wasm.js
CHANGED
|
@@ -3148,6 +3148,10 @@ function __wbg_get_imports() {
|
|
|
3148
3148
|
const ret = getObject(arg0).createObjectStore(getStringFromWasm0(arg1, arg2));
|
|
3149
3149
|
return addHeapObject(ret);
|
|
3150
3150
|
}, arguments); },
|
|
3151
|
+
__wbg_defineProperty_83586bc35b9ff065: function(arg0, arg1, arg2) {
|
|
3152
|
+
const ret = Object.defineProperty(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
3153
|
+
return addHeapObject(ret);
|
|
3154
|
+
},
|
|
3151
3155
|
__wbg_deleteDatabase_4335c8782ceae0d9: function() { return handleError(function (arg0, arg1, arg2) {
|
|
3152
3156
|
const ret = getObject(arg0).deleteDatabase(getStringFromWasm0(arg1, arg2));
|
|
3153
3157
|
return addHeapObject(ret);
|
|
@@ -3290,6 +3294,10 @@ function __wbg_get_imports() {
|
|
|
3290
3294
|
const ret = new Map();
|
|
3291
3295
|
return addHeapObject(ret);
|
|
3292
3296
|
},
|
|
3297
|
+
__wbg_new_1f236d63ba0c4784: function(arg0, arg1) {
|
|
3298
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
3299
|
+
return addHeapObject(ret);
|
|
3300
|
+
},
|
|
3293
3301
|
__wbg_new_310879b66b6e95e1: function() {
|
|
3294
3302
|
const ret = new Array();
|
|
3295
3303
|
return addHeapObject(ret);
|
|
@@ -3305,7 +3313,7 @@ function __wbg_get_imports() {
|
|
|
3305
3313
|
const a = state0.a;
|
|
3306
3314
|
state0.a = 0;
|
|
3307
3315
|
try {
|
|
3308
|
-
return
|
|
3316
|
+
return __wasm_bindgen_func_elem_1324(a, state0.b, arg0, arg1);
|
|
3309
3317
|
} finally {
|
|
3310
3318
|
state0.a = a;
|
|
3311
3319
|
}
|
|
@@ -3327,7 +3335,7 @@ function __wbg_get_imports() {
|
|
|
3327
3335
|
const a = state0.a;
|
|
3328
3336
|
state0.a = 0;
|
|
3329
3337
|
try {
|
|
3330
|
-
return
|
|
3338
|
+
return __wasm_bindgen_func_elem_1324(a, state0.b, arg0, arg1);
|
|
3331
3339
|
} finally {
|
|
3332
3340
|
state0.a = a;
|
|
3333
3341
|
}
|
|
@@ -3398,6 +3406,10 @@ function __wbg_get_imports() {
|
|
|
3398
3406
|
__wbg_set_78ea6a19f4818587: function(arg0, arg1, arg2) {
|
|
3399
3407
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
3400
3408
|
},
|
|
3409
|
+
__wbg_set_a0e911be3da02782: function() { return handleError(function (arg0, arg1, arg2) {
|
|
3410
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
3411
|
+
return ret;
|
|
3412
|
+
}, arguments); },
|
|
3401
3413
|
__wbg_set_facb7a5914e0fa39: function(arg0, arg1, arg2) {
|
|
3402
3414
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
3403
3415
|
return addHeapObject(ret);
|
|
@@ -3463,13 +3475,13 @@ function __wbg_get_imports() {
|
|
|
3463
3475
|
console.warn(getObject(arg0));
|
|
3464
3476
|
},
|
|
3465
3477
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
3466
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3467
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3478
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 280, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3479
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1308);
|
|
3468
3480
|
return addHeapObject(ret);
|
|
3469
3481
|
},
|
|
3470
3482
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
3471
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
3472
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3483
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 8, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3484
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_438);
|
|
3473
3485
|
return addHeapObject(ret);
|
|
3474
3486
|
},
|
|
3475
3487
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -3506,14 +3518,14 @@ function __wbg_get_imports() {
|
|
|
3506
3518
|
};
|
|
3507
3519
|
}
|
|
3508
3520
|
|
|
3509
|
-
function
|
|
3510
|
-
wasm.
|
|
3521
|
+
function __wasm_bindgen_func_elem_438(arg0, arg1, arg2) {
|
|
3522
|
+
wasm.__wasm_bindgen_func_elem_438(arg0, arg1, addHeapObject(arg2));
|
|
3511
3523
|
}
|
|
3512
3524
|
|
|
3513
|
-
function
|
|
3525
|
+
function __wasm_bindgen_func_elem_1308(arg0, arg1, arg2) {
|
|
3514
3526
|
try {
|
|
3515
3527
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3516
|
-
wasm.
|
|
3528
|
+
wasm.__wasm_bindgen_func_elem_1308(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3517
3529
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3518
3530
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3519
3531
|
if (r1) {
|
|
@@ -3524,8 +3536,8 @@ function __wasm_bindgen_func_elem_1266(arg0, arg1, arg2) {
|
|
|
3524
3536
|
}
|
|
3525
3537
|
}
|
|
3526
3538
|
|
|
3527
|
-
function
|
|
3528
|
-
wasm.
|
|
3539
|
+
function __wasm_bindgen_func_elem_1324(arg0, arg1, arg2, arg3) {
|
|
3540
|
+
wasm.__wasm_bindgen_func_elem_1324(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
3529
3541
|
}
|
|
3530
3542
|
|
|
3531
3543
|
|
package/velesdb_wasm_bg.wasm
CHANGED
|
Binary file
|