@rindle/wasm 0.10.1 → 0.10.3
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/package.json +2 -2
- package/pkg/rindle.d.ts +6 -6
- package/pkg/rindle.js +6 -6
- package/pkg/rindle_bg.wasm +0 -0
- package/src/index.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindle/wasm",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"README.md"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@rindle/client": "0.10.
|
|
32
|
+
"@rindle/client": "0.10.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^22.10.0",
|
package/pkg/rindle.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export class Db {
|
|
|
9
9
|
[Symbol.dispose](): void;
|
|
10
10
|
/**
|
|
11
11
|
* Tear down a registered query: drop its sink + reclaim its pipeline (disconnect from
|
|
12
|
-
* the shared sources, free its slots — [`Graph::destroy_pipeline`]). Other queries
|
|
12
|
+
* the shared sources, free its slots — [`Graph::destroy_pipeline`](crate::graph::Graph::destroy_pipeline)). Other queries
|
|
13
13
|
* and the shared sources are untouched. A no-op for an unknown id.
|
|
14
14
|
*/
|
|
15
15
|
destroyQuery(query_id: number): void;
|
|
@@ -125,7 +125,7 @@ export class RindleView {
|
|
|
125
125
|
flush(): void;
|
|
126
126
|
/**
|
|
127
127
|
* Push one source change `{ type: 'add'|'remove'|'edit', row, old? }` to `table`.
|
|
128
|
-
* Does **not** flush — call [`RindleView::flush`] to close the transaction (so a JS
|
|
128
|
+
* Does **not** flush — call [`RindleView::flush`](crate::wasm::RindleView::flush) to close the transaction (so a JS
|
|
129
129
|
* client can batch several pushes into one notification).
|
|
130
130
|
*/
|
|
131
131
|
push(table: string, change: any): void;
|
|
@@ -140,7 +140,7 @@ export class RindleView {
|
|
|
140
140
|
setResultType(rt: string): void;
|
|
141
141
|
/**
|
|
142
142
|
* Subscribe a JS callback `(data, resultType) => void`, fired **once
|
|
143
|
-
* immediately** and on every subsequent [`RindleView::flush`]. Returns the
|
|
143
|
+
* immediately** and on every subsequent [`RindleView::flush`](crate::wasm::RindleView::flush). Returns the
|
|
144
144
|
* listener index.
|
|
145
145
|
*/
|
|
146
146
|
subscribe(cb: Function): number;
|
|
@@ -177,11 +177,11 @@ export class WriteTxn {
|
|
|
177
177
|
* Stage an edit of `old` → `new_row` in `table` (both width-checked).
|
|
178
178
|
*
|
|
179
179
|
* **Partial (optimistic) edit (`PROJECTION-SUPPORT-DESIGN.md` §8 / OQ-3).** An
|
|
180
|
-
* [`OwnedValue::Absent`] cell in `new_row` means *"not touching this column — leave it
|
|
180
|
+
* [`OwnedValue::Absent`](crate::value::OwnedValue::Absent) cell in `new_row` means *"not touching this column — leave it
|
|
181
181
|
* unchanged"*: it falls through to the current **effective** row (the live engine under
|
|
182
182
|
* this txn's staged overlay, i.e. what [`WriteTxn::get`] would return). The merge is
|
|
183
183
|
* resolved **here, at the staging boundary**, into a concrete full-width
|
|
184
|
-
* [`SourceChange::Edit`] whose `old` is that effective row — so operators, indexes, and
|
|
184
|
+
* [`SourceChange::Edit`](crate::change::SourceChange::Edit) whose `old` is that effective row — so operators, indexes, and
|
|
185
185
|
* the overlay never learn about merge semantics (they keep seeing whole rows), and a
|
|
186
186
|
* re-invocation after a server rebase re-reads the *new* effective row and re-merges.
|
|
187
187
|
* Presence is **monotonic**: a partial edit only *sets* columns (or leaves them), never
|
|
@@ -208,7 +208,7 @@ export class WriteTxn {
|
|
|
208
208
|
*
|
|
209
209
|
* Mechanically this is [`Db::query`] minus the persisted `QueryReg`, pointed at the
|
|
210
210
|
* per-table read-cache forks (§4): for every table the AST reads it seeds a cache fork
|
|
211
|
-
* (
|
|
211
|
+
* (`ensure_fork`) and registers a throwaway COW **fork-of-fork** of
|
|
212
212
|
* it as a *scratch* source node — `add_memory_source` takes the source by value, so the
|
|
213
213
|
* cache fork stays in `forks` for later reads/writes. It then builds a transient
|
|
214
214
|
* pipeline over those scratch nodes, hydrates the snapshot, and tears **everything**
|
package/pkg/rindle.js
CHANGED
|
@@ -16,7 +16,7 @@ export class Db {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Tear down a registered query: drop its sink + reclaim its pipeline (disconnect from
|
|
19
|
-
* the shared sources, free its slots — [`Graph::destroy_pipeline`]). Other queries
|
|
19
|
+
* the shared sources, free its slots — [`Graph::destroy_pipeline`](crate::graph::Graph::destroy_pipeline)). Other queries
|
|
20
20
|
* and the shared sources are untouched. A no-op for an unknown id.
|
|
21
21
|
* @param {number} query_id
|
|
22
22
|
*/
|
|
@@ -217,7 +217,7 @@ export class RindleView {
|
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
219
|
* Push one source change `{ type: 'add'|'remove'|'edit', row, old? }` to `table`.
|
|
220
|
-
* Does **not** flush — call [`RindleView::flush`] to close the transaction (so a JS
|
|
220
|
+
* Does **not** flush — call [`RindleView::flush`](crate::wasm::RindleView::flush) to close the transaction (so a JS
|
|
221
221
|
* client can batch several pushes into one notification).
|
|
222
222
|
* @param {string} table
|
|
223
223
|
* @param {any} change
|
|
@@ -250,7 +250,7 @@ export class RindleView {
|
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
252
|
* Subscribe a JS callback `(data, resultType) => void`, fired **once
|
|
253
|
-
* immediately** and on every subsequent [`RindleView::flush`]. Returns the
|
|
253
|
+
* immediately** and on every subsequent [`RindleView::flush`](crate::wasm::RindleView::flush). Returns the
|
|
254
254
|
* listener index.
|
|
255
255
|
* @param {Function} cb
|
|
256
256
|
* @returns {number}
|
|
@@ -323,11 +323,11 @@ export class WriteTxn {
|
|
|
323
323
|
* Stage an edit of `old` → `new_row` in `table` (both width-checked).
|
|
324
324
|
*
|
|
325
325
|
* **Partial (optimistic) edit (`PROJECTION-SUPPORT-DESIGN.md` §8 / OQ-3).** An
|
|
326
|
-
* [`OwnedValue::Absent`] cell in `new_row` means *"not touching this column — leave it
|
|
326
|
+
* [`OwnedValue::Absent`](crate::value::OwnedValue::Absent) cell in `new_row` means *"not touching this column — leave it
|
|
327
327
|
* unchanged"*: it falls through to the current **effective** row (the live engine under
|
|
328
328
|
* this txn's staged overlay, i.e. what [`WriteTxn::get`] would return). The merge is
|
|
329
329
|
* resolved **here, at the staging boundary**, into a concrete full-width
|
|
330
|
-
* [`SourceChange::Edit`] whose `old` is that effective row — so operators, indexes, and
|
|
330
|
+
* [`SourceChange::Edit`](crate::change::SourceChange::Edit) whose `old` is that effective row — so operators, indexes, and
|
|
331
331
|
* the overlay never learn about merge semantics (they keep seeing whole rows), and a
|
|
332
332
|
* re-invocation after a server rebase re-reads the *new* effective row and re-merges.
|
|
333
333
|
* Presence is **monotonic**: a partial edit only *sets* columns (or leaves them), never
|
|
@@ -375,7 +375,7 @@ export class WriteTxn {
|
|
|
375
375
|
*
|
|
376
376
|
* Mechanically this is [`Db::query`] minus the persisted `QueryReg`, pointed at the
|
|
377
377
|
* per-table read-cache forks (§4): for every table the AST reads it seeds a cache fork
|
|
378
|
-
* (
|
|
378
|
+
* (`ensure_fork`) and registers a throwaway COW **fork-of-fork** of
|
|
379
379
|
* it as a *scratch* source node — `add_memory_source` takes the source by value, so the
|
|
380
380
|
* cache fork stays in `forks` for later reads/writes. It then builds a transient
|
|
381
381
|
* pipeline over those scratch nodes, hydrates the snapshot, and tears **everything**
|
package/pkg/rindle_bg.wasm
CHANGED
|
Binary file
|
package/src/index.ts
CHANGED
|
@@ -24,7 +24,7 @@ export * from "@rindle/client";
|
|
|
24
24
|
// One source per table (302-ROOM-STORE-SEPARATION-DESIGN.md): the engine holds ordinary tables
|
|
25
25
|
// only — a room-backed table is just another registered table whose deltas happen to arrive on a
|
|
26
26
|
// room channel. The multi-source merge surface that briefly lived here was removed with
|
|
27
|
-
// `rust/src/merge.rs`.
|
|
27
|
+
// `rust/rindle/src/merge.rs`.
|
|
28
28
|
interface WasmDb {
|
|
29
29
|
registerTable(table: string, spec: { columns: string[]; primaryKey: number[] }, local: boolean): void;
|
|
30
30
|
unregisterTable(table: string): void;
|