@livestore/livestore 0.4.0-dev.9 → 0.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.
Files changed (129) hide show
  1. package/README.md +0 -1
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/QueryCache.js +1 -1
  4. package/dist/QueryCache.js.map +1 -1
  5. package/dist/SqliteDbWrapper.d.ts +5 -5
  6. package/dist/SqliteDbWrapper.d.ts.map +1 -1
  7. package/dist/SqliteDbWrapper.js +8 -8
  8. package/dist/SqliteDbWrapper.js.map +1 -1
  9. package/dist/SqliteDbWrapper.test.js +4 -3
  10. package/dist/SqliteDbWrapper.test.js.map +1 -1
  11. package/dist/effect/LiveStore.d.ts +133 -5
  12. package/dist/effect/LiveStore.d.ts.map +1 -1
  13. package/dist/effect/LiveStore.js +187 -8
  14. package/dist/effect/LiveStore.js.map +1 -1
  15. package/dist/effect/LiveStore.test.d.ts +2 -0
  16. package/dist/effect/LiveStore.test.d.ts.map +1 -0
  17. package/dist/effect/LiveStore.test.js +42 -0
  18. package/dist/effect/LiveStore.test.js.map +1 -0
  19. package/dist/effect/mod.d.ts +1 -1
  20. package/dist/effect/mod.d.ts.map +1 -1
  21. package/dist/effect/mod.js +3 -1
  22. package/dist/effect/mod.js.map +1 -1
  23. package/dist/live-queries/base-class.d.ts +110 -7
  24. package/dist/live-queries/base-class.d.ts.map +1 -1
  25. package/dist/live-queries/base-class.js +2 -2
  26. package/dist/live-queries/base-class.js.map +1 -1
  27. package/dist/live-queries/client-document-get-query.d.ts +1 -1
  28. package/dist/live-queries/client-document-get-query.d.ts.map +1 -1
  29. package/dist/live-queries/client-document-get-query.js +4 -3
  30. package/dist/live-queries/client-document-get-query.js.map +1 -1
  31. package/dist/live-queries/computed.d.ts +56 -0
  32. package/dist/live-queries/computed.d.ts.map +1 -1
  33. package/dist/live-queries/computed.js +58 -2
  34. package/dist/live-queries/computed.js.map +1 -1
  35. package/dist/live-queries/db-query.d.ts.map +1 -1
  36. package/dist/live-queries/db-query.js +21 -19
  37. package/dist/live-queries/db-query.js.map +1 -1
  38. package/dist/live-queries/db-query.test.js +106 -23
  39. package/dist/live-queries/db-query.test.js.map +1 -1
  40. package/dist/live-queries/signal.d.ts +49 -0
  41. package/dist/live-queries/signal.d.ts.map +1 -1
  42. package/dist/live-queries/signal.js +49 -0
  43. package/dist/live-queries/signal.js.map +1 -1
  44. package/dist/live-queries/signal.test.js +2 -2
  45. package/dist/live-queries/signal.test.js.map +1 -1
  46. package/dist/mod.d.ts +3 -3
  47. package/dist/mod.d.ts.map +1 -1
  48. package/dist/mod.js +3 -2
  49. package/dist/mod.js.map +1 -1
  50. package/dist/reactive.d.ts +9 -9
  51. package/dist/reactive.d.ts.map +1 -1
  52. package/dist/reactive.js +9 -26
  53. package/dist/reactive.js.map +1 -1
  54. package/dist/reactive.test.js +2 -2
  55. package/dist/reactive.test.js.map +1 -1
  56. package/dist/store/StoreRegistry.d.ts +215 -0
  57. package/dist/store/StoreRegistry.d.ts.map +1 -0
  58. package/dist/store/StoreRegistry.js +267 -0
  59. package/dist/store/StoreRegistry.js.map +1 -0
  60. package/dist/store/StoreRegistry.test.d.ts +2 -0
  61. package/dist/store/StoreRegistry.test.d.ts.map +1 -0
  62. package/dist/store/StoreRegistry.test.js +381 -0
  63. package/dist/store/StoreRegistry.test.js.map +1 -0
  64. package/dist/store/create-store.d.ts +98 -18
  65. package/dist/store/create-store.d.ts.map +1 -1
  66. package/dist/store/create-store.js +49 -20
  67. package/dist/store/create-store.js.map +1 -1
  68. package/dist/store/devtools.d.ts +5 -16
  69. package/dist/store/devtools.d.ts.map +1 -1
  70. package/dist/store/devtools.js +59 -18
  71. package/dist/store/devtools.js.map +1 -1
  72. package/dist/store/store-eventstream.test.d.ts +2 -0
  73. package/dist/store/store-eventstream.test.d.ts.map +1 -0
  74. package/dist/store/store-eventstream.test.js +65 -0
  75. package/dist/store/store-eventstream.test.js.map +1 -0
  76. package/dist/store/store-types.d.ts +285 -27
  77. package/dist/store/store-types.d.ts.map +1 -1
  78. package/dist/store/store-types.js +77 -1
  79. package/dist/store/store-types.js.map +1 -1
  80. package/dist/store/store-types.test.d.ts +2 -0
  81. package/dist/store/store-types.test.d.ts.map +1 -0
  82. package/dist/store/store-types.test.js +39 -0
  83. package/dist/store/store-types.test.js.map +1 -0
  84. package/dist/store/store.d.ts +253 -66
  85. package/dist/store/store.d.ts.map +1 -1
  86. package/dist/store/store.js +442 -153
  87. package/dist/store/store.js.map +1 -1
  88. package/dist/utils/dev.d.ts.map +1 -1
  89. package/dist/utils/dev.js.map +1 -1
  90. package/dist/utils/stack-info.js +2 -2
  91. package/dist/utils/stack-info.js.map +1 -1
  92. package/dist/utils/tests/fixture.d.ts +20 -5
  93. package/dist/utils/tests/fixture.d.ts.map +1 -1
  94. package/dist/utils/tests/fixture.js +7 -0
  95. package/dist/utils/tests/fixture.js.map +1 -1
  96. package/dist/utils/tests/otel.d.ts.map +1 -1
  97. package/dist/utils/tests/otel.js +5 -5
  98. package/dist/utils/tests/otel.js.map +1 -1
  99. package/package.json +59 -17
  100. package/src/QueryCache.ts +1 -1
  101. package/src/SqliteDbWrapper.test.ts +5 -3
  102. package/src/SqliteDbWrapper.ts +12 -11
  103. package/src/ambient.d.ts +0 -7
  104. package/src/effect/LiveStore.test.ts +61 -0
  105. package/src/effect/LiveStore.ts +388 -13
  106. package/src/effect/mod.ts +13 -1
  107. package/src/live-queries/__snapshots__/db-query.test.ts.snap +604 -192
  108. package/src/live-queries/base-class.ts +126 -28
  109. package/src/live-queries/client-document-get-query.ts +6 -4
  110. package/src/live-queries/computed.ts +59 -2
  111. package/src/live-queries/db-query.test.ts +162 -24
  112. package/src/live-queries/db-query.ts +23 -20
  113. package/src/live-queries/signal.test.ts +3 -2
  114. package/src/live-queries/signal.ts +49 -0
  115. package/src/mod.ts +19 -2
  116. package/src/reactive.test.ts +3 -2
  117. package/src/reactive.ts +22 -23
  118. package/src/store/StoreRegistry.test.ts +540 -0
  119. package/src/store/StoreRegistry.ts +418 -0
  120. package/src/store/create-store.ts +158 -39
  121. package/src/store/devtools.ts +77 -33
  122. package/src/store/store-eventstream.test.ts +114 -0
  123. package/src/store/store-types.test.ts +52 -0
  124. package/src/store/store-types.ts +360 -40
  125. package/src/store/store.ts +571 -236
  126. package/src/utils/dev.ts +2 -3
  127. package/src/utils/stack-info.ts +2 -2
  128. package/src/utils/tests/fixture.ts +9 -1
  129. package/src/utils/tests/otel.ts +8 -7
@@ -1,6 +1,6 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`otel > QueryBuilder subscription - basic functionality 1`] = `
3
+ exports[`otel > QueryBuilder subscription - async iterator 1`] = `
4
4
  {
5
5
  "_name": "createStore",
6
6
  "attributes": {
@@ -8,6 +8,9 @@ exports[`otel > QueryBuilder subscription - basic functionality 1`] = `
8
8
  "storeId": "default",
9
9
  },
10
10
  "children": [
11
+ {
12
+ "_name": "makeClientSessionSyncProcessor",
13
+ },
11
14
  {
12
15
  "_name": "livestore.in-memory-db:execute",
13
16
  "attributes": {
@@ -21,22 +24,220 @@ exports[`otel > QueryBuilder subscription - basic functionality 1`] = `
21
24
  },
22
25
  },
23
26
  {
24
- "_name": "@livestore/common:LeaderSyncProcessor:push",
27
+ "_name": "client-session-sync-processor:boot",
28
+ "children": [
29
+ {
30
+ "_name": "@livestore/common:LeaderSyncProcessor:push",
31
+ "attributes": {
32
+ "batch": "undefined",
33
+ "batchSize": 1,
34
+ },
35
+ },
36
+ {
37
+ "_name": "client-session-sync-processor:pull",
38
+ "attributes": {
39
+ "code.stacktrace": "<STACKTRACE>",
40
+ "span.label": "⚠︎ Interrupted",
41
+ "status.interrupted": true,
42
+ },
43
+ },
44
+ ],
45
+ },
46
+ {
47
+ "_name": "LiveStore:commits",
48
+ },
49
+ {
50
+ "_name": "LiveStore:queries",
51
+ },
52
+ ],
53
+ }
54
+ `;
55
+
56
+ exports[`otel > QueryBuilder subscription - async iterator 2`] = `
57
+ [
58
+ {
59
+ "_name": "LiveStore:commit",
60
+ "attributes": {
61
+ "livestore.eventTags": "[
62
+ "todo.created"
63
+ ]",
64
+ "livestore.eventsCount": 1,
65
+ },
66
+ "children": [
67
+ {
68
+ "_name": "client-session-sync-processor:encode-events",
69
+ },
70
+ {
71
+ "_name": "client-session-sync-processor:materialize-events",
72
+ "children": [
73
+ {
74
+ "_name": "client-session-sync-processor:materialize-event",
75
+ "children": [
76
+ {
77
+ "_name": "livestore.in-memory-db:execute",
78
+ "attributes": {
79
+ "sql.query": "INSERT INTO 'todos' ("id", "text", "completed") VALUES (?, ?, ?)",
80
+ },
81
+ },
82
+ ],
83
+ },
84
+ ],
85
+ },
86
+ {
87
+ "_name": "client-session-sync-processor:push",
88
+ "attributes": {
89
+ "batchSize": 1,
90
+ "eventCounts": "{
91
+ "todo.created": 1
92
+ }",
93
+ "mergeResultTag": "advance",
94
+ },
95
+ },
96
+ ],
97
+ },
98
+ ]
99
+ `;
100
+
101
+ exports[`otel > QueryBuilder subscription - async iterator with skipInitialRun 1`] = `
102
+ {
103
+ "_name": "createStore",
104
+ "attributes": {
105
+ "debugInstanceId": "test",
106
+ "storeId": "default",
107
+ },
108
+ "children": [
109
+ {
110
+ "_name": "makeClientSessionSyncProcessor",
111
+ },
112
+ {
113
+ "_name": "livestore.in-memory-db:execute",
25
114
  "attributes": {
26
- "batch": "undefined",
27
- "batchSize": 1,
115
+ "sql.query": "
116
+ PRAGMA page_size=32768;
117
+ PRAGMA cache_size=10000;
118
+ PRAGMA synchronous='OFF';
119
+ PRAGMA temp_store='MEMORY';
120
+ PRAGMA foreign_keys='ON'; -- we want foreign key constraints to be enforced
121
+ ",
28
122
  },
29
123
  },
30
124
  {
31
- "_name": "client-session-sync-processor:pull",
125
+ "_name": "client-session-sync-processor:boot",
126
+ "children": [
127
+ {
128
+ "_name": "@livestore/common:LeaderSyncProcessor:push",
129
+ "attributes": {
130
+ "batch": "undefined",
131
+ "batchSize": 1,
132
+ },
133
+ },
134
+ {
135
+ "_name": "client-session-sync-processor:pull",
136
+ "attributes": {
137
+ "code.stacktrace": "<STACKTRACE>",
138
+ "span.label": "⚠︎ Interrupted",
139
+ "status.interrupted": true,
140
+ },
141
+ },
142
+ ],
143
+ },
144
+ {
145
+ "_name": "LiveStore:commits",
146
+ },
147
+ {
148
+ "_name": "LiveStore:queries",
149
+ },
150
+ ],
151
+ }
152
+ `;
153
+
154
+ exports[`otel > QueryBuilder subscription - async iterator with skipInitialRun 2`] = `
155
+ [
156
+ {
157
+ "_name": "LiveStore:commit",
158
+ "attributes": {
159
+ "livestore.eventTags": "[
160
+ "todo.created"
161
+ ]",
162
+ "livestore.eventsCount": 1,
163
+ },
164
+ "children": [
165
+ {
166
+ "_name": "client-session-sync-processor:encode-events",
167
+ },
168
+ {
169
+ "_name": "client-session-sync-processor:materialize-events",
170
+ "children": [
171
+ {
172
+ "_name": "client-session-sync-processor:materialize-event",
173
+ "children": [
174
+ {
175
+ "_name": "livestore.in-memory-db:execute",
176
+ "attributes": {
177
+ "sql.query": "INSERT INTO 'todos' ("id", "text", "completed") VALUES (?, ?, ?)",
178
+ },
179
+ },
180
+ ],
181
+ },
182
+ ],
183
+ },
184
+ {
185
+ "_name": "client-session-sync-processor:push",
186
+ "attributes": {
187
+ "batchSize": 1,
188
+ "eventCounts": "{
189
+ "todo.created": 1
190
+ }",
191
+ "mergeResultTag": "advance",
192
+ },
193
+ },
194
+ ],
195
+ },
196
+ ]
197
+ `;
198
+
199
+ exports[`otel > QueryBuilder subscription - basic functionality 1`] = `
200
+ {
201
+ "_name": "createStore",
202
+ "attributes": {
203
+ "debugInstanceId": "test",
204
+ "storeId": "default",
205
+ },
206
+ "children": [
207
+ {
208
+ "_name": "makeClientSessionSyncProcessor",
209
+ },
210
+ {
211
+ "_name": "livestore.in-memory-db:execute",
32
212
  "attributes": {
33
- "code.stacktrace": "<STACKTRACE>",
34
- "span.label": "⚠︎ Interrupted",
35
- "status.interrupted": true,
213
+ "sql.query": "
214
+ PRAGMA page_size=32768;
215
+ PRAGMA cache_size=10000;
216
+ PRAGMA synchronous='OFF';
217
+ PRAGMA temp_store='MEMORY';
218
+ PRAGMA foreign_keys='ON'; -- we want foreign key constraints to be enforced
219
+ ",
36
220
  },
37
221
  },
38
222
  {
39
- "_name": "LiveStore:sync",
223
+ "_name": "client-session-sync-processor:boot",
224
+ "children": [
225
+ {
226
+ "_name": "@livestore/common:LeaderSyncProcessor:push",
227
+ "attributes": {
228
+ "batch": "undefined",
229
+ "batchSize": 1,
230
+ },
231
+ },
232
+ {
233
+ "_name": "client-session-sync-processor:pull",
234
+ "attributes": {
235
+ "code.stacktrace": "<STACKTRACE>",
236
+ "span.label": "⚠︎ Interrupted",
237
+ "status.interrupted": true,
238
+ },
239
+ },
240
+ ],
40
241
  },
41
242
  {
42
243
  "_name": "LiveStore:commits",
@@ -47,14 +248,14 @@ exports[`otel > QueryBuilder subscription - basic functionality 1`] = `
47
248
  {
48
249
  "_name": "LiveStore.subscribe",
49
250
  "attributes": {
50
- "queryLabel": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
251
+ "queryLabel": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
51
252
  },
52
253
  "children": [
53
254
  {
54
- "_name": "db:SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
255
+ "_name": "db:SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ",
55
256
  "attributes": {
56
257
  "livestore.debugRefreshReason": "subscribe-initial-run:undefined",
57
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
258
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
58
259
  "sql.rowsCount": 0,
59
260
  },
60
261
  "children": [
@@ -62,17 +263,17 @@ exports[`otel > QueryBuilder subscription - basic functionality 1`] = `
62
263
  "_name": "sql-in-memory-select",
63
264
  "attributes": {
64
265
  "sql.cached": false,
65
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
266
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
66
267
  "sql.rowsCount": 0,
67
268
  },
68
269
  },
69
270
  ],
70
271
  },
71
272
  {
72
- "_name": "db:SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
273
+ "_name": "db:SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ",
73
274
  "attributes": {
74
275
  "livestore.debugRefreshReason": "commit",
75
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
276
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
76
277
  "sql.rowsCount": 1,
77
278
  },
78
279
  "children": [
@@ -80,7 +281,7 @@ exports[`otel > QueryBuilder subscription - basic functionality 1`] = `
80
281
  "_name": "sql-in-memory-select",
81
282
  "attributes": {
82
283
  "sql.cached": false,
83
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
284
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
84
285
  "sql.rowsCount": 1,
85
286
  },
86
287
  },
@@ -106,14 +307,154 @@ exports[`otel > QueryBuilder subscription - basic functionality 2`] = `
106
307
  },
107
308
  "children": [
108
309
  {
109
- "_name": "client-session-sync-processor:push",
110
- "attributes": {
111
- "batchSize": 1,
112
- "eventCounts": "{
113
- "todo.created": 1
114
- }",
115
- "mergeResultTag": "advance",
116
- },
310
+ "_name": "client-session-sync-processor:encode-events",
311
+ },
312
+ {
313
+ "_name": "client-session-sync-processor:materialize-events",
314
+ "children": [
315
+ {
316
+ "_name": "client-session-sync-processor:materialize-event",
317
+ "children": [
318
+ {
319
+ "_name": "livestore.in-memory-db:execute",
320
+ "attributes": {
321
+ "sql.query": "INSERT INTO 'todos' ("id", "text", "completed") VALUES (?, ?, ?)",
322
+ },
323
+ },
324
+ ],
325
+ },
326
+ ],
327
+ },
328
+ {
329
+ "_name": "client-session-sync-processor:push",
330
+ "attributes": {
331
+ "batchSize": 1,
332
+ "eventCounts": "{
333
+ "todo.created": 1
334
+ }",
335
+ "mergeResultTag": "advance",
336
+ },
337
+ },
338
+ ],
339
+ },
340
+ ]
341
+ `;
342
+
343
+ exports[`otel > QueryBuilder subscription - direct table subscription 1`] = `
344
+ {
345
+ "_name": "createStore",
346
+ "attributes": {
347
+ "debugInstanceId": "test",
348
+ "storeId": "default",
349
+ },
350
+ "children": [
351
+ {
352
+ "_name": "makeClientSessionSyncProcessor",
353
+ },
354
+ {
355
+ "_name": "livestore.in-memory-db:execute",
356
+ "attributes": {
357
+ "sql.query": "
358
+ PRAGMA page_size=32768;
359
+ PRAGMA cache_size=10000;
360
+ PRAGMA synchronous='OFF';
361
+ PRAGMA temp_store='MEMORY';
362
+ PRAGMA foreign_keys='ON'; -- we want foreign key constraints to be enforced
363
+ ",
364
+ },
365
+ },
366
+ {
367
+ "_name": "client-session-sync-processor:boot",
368
+ "children": [
369
+ {
370
+ "_name": "@livestore/common:LeaderSyncProcessor:push",
371
+ "attributes": {
372
+ "batch": "undefined",
373
+ "batchSize": 1,
374
+ },
375
+ },
376
+ {
377
+ "_name": "client-session-sync-processor:pull",
378
+ "attributes": {
379
+ "code.stacktrace": "<STACKTRACE>",
380
+ "span.label": "⚠︎ Interrupted",
381
+ "status.interrupted": true,
382
+ },
383
+ },
384
+ ],
385
+ },
386
+ {
387
+ "_name": "LiveStore:commits",
388
+ },
389
+ {
390
+ "_name": "LiveStore:queries",
391
+ "children": [
392
+ {
393
+ "_name": "LiveStore.subscribe",
394
+ "attributes": {
395
+ "queryLabel": "SELECT * FROM 'todos'",
396
+ },
397
+ "children": [
398
+ {
399
+ "_name": "db:SELECT * FROM 'todos'",
400
+ "attributes": {
401
+ "livestore.debugRefreshReason": "subscribe-initial-run:undefined",
402
+ "sql.query": "SELECT * FROM 'todos'",
403
+ "sql.rowsCount": 0,
404
+ },
405
+ "children": [
406
+ {
407
+ "_name": "sql-in-memory-select",
408
+ "attributes": {
409
+ "sql.cached": false,
410
+ "sql.query": "SELECT * FROM 'todos'",
411
+ "sql.rowsCount": 0,
412
+ },
413
+ },
414
+ ],
415
+ },
416
+ {
417
+ "_name": "db:SELECT * FROM 'todos'",
418
+ "attributes": {
419
+ "livestore.debugRefreshReason": "commit",
420
+ "sql.query": "SELECT * FROM 'todos'",
421
+ "sql.rowsCount": 1,
422
+ },
423
+ "children": [
424
+ {
425
+ "_name": "sql-in-memory-select",
426
+ "attributes": {
427
+ "sql.cached": false,
428
+ "sql.query": "SELECT * FROM 'todos'",
429
+ "sql.rowsCount": 1,
430
+ },
431
+ },
432
+ ],
433
+ },
434
+ ],
435
+ },
436
+ ],
437
+ },
438
+ ],
439
+ }
440
+ `;
441
+
442
+ exports[`otel > QueryBuilder subscription - direct table subscription 2`] = `
443
+ [
444
+ {
445
+ "_name": "LiveStore:commit",
446
+ "attributes": {
447
+ "livestore.eventTags": "[
448
+ "todo.created"
449
+ ]",
450
+ "livestore.eventsCount": 1,
451
+ },
452
+ "children": [
453
+ {
454
+ "_name": "client-session-sync-processor:encode-events",
455
+ },
456
+ {
457
+ "_name": "client-session-sync-processor:materialize-events",
117
458
  "children": [
118
459
  {
119
460
  "_name": "client-session-sync-processor:materialize-event",
@@ -121,19 +462,29 @@ exports[`otel > QueryBuilder subscription - basic functionality 2`] = `
121
462
  {
122
463
  "_name": "livestore.in-memory-db:execute",
123
464
  "attributes": {
124
- "sql.query": "INSERT INTO 'todos' (id, text, completed) VALUES (?, ?, ?)",
465
+ "sql.query": "INSERT INTO 'todos' ("id", "text", "completed") VALUES (?, ?, ?)",
125
466
  },
126
467
  },
127
468
  ],
128
469
  },
129
470
  ],
130
471
  },
472
+ {
473
+ "_name": "client-session-sync-processor:push",
474
+ "attributes": {
475
+ "batchSize": 1,
476
+ "eventCounts": "{
477
+ "todo.created": 1
478
+ }",
479
+ "mergeResultTag": "advance",
480
+ },
481
+ },
131
482
  ],
132
483
  },
133
484
  ]
134
485
  `;
135
486
 
136
- exports[`otel > QueryBuilder subscription - direct table subscription 1`] = `
487
+ exports[`otel > QueryBuilder subscription - skipInitialRun 1`] = `
137
488
  {
138
489
  "_name": "createStore",
139
490
  "attributes": {
@@ -141,6 +492,9 @@ exports[`otel > QueryBuilder subscription - direct table subscription 1`] = `
141
492
  "storeId": "default",
142
493
  },
143
494
  "children": [
495
+ {
496
+ "_name": "makeClientSessionSyncProcessor",
497
+ },
144
498
  {
145
499
  "_name": "livestore.in-memory-db:execute",
146
500
  "attributes": {
@@ -154,22 +508,24 @@ exports[`otel > QueryBuilder subscription - direct table subscription 1`] = `
154
508
  },
155
509
  },
156
510
  {
157
- "_name": "@livestore/common:LeaderSyncProcessor:push",
158
- "attributes": {
159
- "batch": "undefined",
160
- "batchSize": 1,
161
- },
162
- },
163
- {
164
- "_name": "client-session-sync-processor:pull",
165
- "attributes": {
166
- "code.stacktrace": "<STACKTRACE>",
167
- "span.label": "⚠︎ Interrupted",
168
- "status.interrupted": true,
169
- },
170
- },
171
- {
172
- "_name": "LiveStore:sync",
511
+ "_name": "client-session-sync-processor:boot",
512
+ "children": [
513
+ {
514
+ "_name": "@livestore/common:LeaderSyncProcessor:push",
515
+ "attributes": {
516
+ "batch": "undefined",
517
+ "batchSize": 1,
518
+ },
519
+ },
520
+ {
521
+ "_name": "client-session-sync-processor:pull",
522
+ "attributes": {
523
+ "code.stacktrace": "<STACKTRACE>",
524
+ "span.label": "⚠︎ Interrupted",
525
+ "status.interrupted": true,
526
+ },
527
+ },
528
+ ],
173
529
  },
174
530
  {
175
531
  "_name": "LiveStore:commits",
@@ -180,14 +536,14 @@ exports[`otel > QueryBuilder subscription - direct table subscription 1`] = `
180
536
  {
181
537
  "_name": "LiveStore.subscribe",
182
538
  "attributes": {
183
- "queryLabel": "SELECT * FROM 'todos'",
539
+ "queryLabel": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
184
540
  },
185
541
  "children": [
186
542
  {
187
- "_name": "db:SELECT * FROM 'todos'",
543
+ "_name": "db:SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ",
188
544
  "attributes": {
189
545
  "livestore.debugRefreshReason": "subscribe-initial-run:undefined",
190
- "sql.query": "SELECT * FROM 'todos'",
546
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
191
547
  "sql.rowsCount": 0,
192
548
  },
193
549
  "children": [
@@ -195,17 +551,17 @@ exports[`otel > QueryBuilder subscription - direct table subscription 1`] = `
195
551
  "_name": "sql-in-memory-select",
196
552
  "attributes": {
197
553
  "sql.cached": false,
198
- "sql.query": "SELECT * FROM 'todos'",
554
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
199
555
  "sql.rowsCount": 0,
200
556
  },
201
557
  },
202
558
  ],
203
559
  },
204
560
  {
205
- "_name": "db:SELECT * FROM 'todos'",
561
+ "_name": "db:SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ",
206
562
  "attributes": {
207
563
  "livestore.debugRefreshReason": "commit",
208
- "sql.query": "SELECT * FROM 'todos'",
564
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
209
565
  "sql.rowsCount": 1,
210
566
  },
211
567
  "children": [
@@ -213,7 +569,7 @@ exports[`otel > QueryBuilder subscription - direct table subscription 1`] = `
213
569
  "_name": "sql-in-memory-select",
214
570
  "attributes": {
215
571
  "sql.cached": false,
216
- "sql.query": "SELECT * FROM 'todos'",
572
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
217
573
  "sql.rowsCount": 1,
218
574
  },
219
575
  },
@@ -227,7 +583,7 @@ exports[`otel > QueryBuilder subscription - direct table subscription 1`] = `
227
583
  }
228
584
  `;
229
585
 
230
- exports[`otel > QueryBuilder subscription - direct table subscription 2`] = `
586
+ exports[`otel > QueryBuilder subscription - skipInitialRun 2`] = `
231
587
  [
232
588
  {
233
589
  "_name": "LiveStore:commit",
@@ -239,14 +595,10 @@ exports[`otel > QueryBuilder subscription - direct table subscription 2`] = `
239
595
  },
240
596
  "children": [
241
597
  {
242
- "_name": "client-session-sync-processor:push",
243
- "attributes": {
244
- "batchSize": 1,
245
- "eventCounts": "{
246
- "todo.created": 1
247
- }",
248
- "mergeResultTag": "advance",
249
- },
598
+ "_name": "client-session-sync-processor:encode-events",
599
+ },
600
+ {
601
+ "_name": "client-session-sync-processor:materialize-events",
250
602
  "children": [
251
603
  {
252
604
  "_name": "client-session-sync-processor:materialize-event",
@@ -254,13 +606,23 @@ exports[`otel > QueryBuilder subscription - direct table subscription 2`] = `
254
606
  {
255
607
  "_name": "livestore.in-memory-db:execute",
256
608
  "attributes": {
257
- "sql.query": "INSERT INTO 'todos' (id, text, completed) VALUES (?, ?, ?)",
609
+ "sql.query": "INSERT INTO 'todos' ("id", "text", "completed") VALUES (?, ?, ?)",
258
610
  },
259
611
  },
260
612
  ],
261
613
  },
262
614
  ],
263
615
  },
616
+ {
617
+ "_name": "client-session-sync-processor:push",
618
+ "attributes": {
619
+ "batchSize": 1,
620
+ "eventCounts": "{
621
+ "todo.created": 1
622
+ }",
623
+ "mergeResultTag": "advance",
624
+ },
625
+ },
264
626
  ],
265
627
  },
266
628
  ]
@@ -274,6 +636,9 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 1`] = `
274
636
  "storeId": "default",
275
637
  },
276
638
  "children": [
639
+ {
640
+ "_name": "makeClientSessionSyncProcessor",
641
+ },
277
642
  {
278
643
  "_name": "livestore.in-memory-db:execute",
279
644
  "attributes": {
@@ -287,29 +652,31 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 1`] = `
287
652
  },
288
653
  },
289
654
  {
290
- "_name": "@livestore/common:LeaderSyncProcessor:push",
291
- "attributes": {
292
- "batch": "undefined",
293
- "batchSize": 1,
294
- },
295
- },
296
- {
297
- "_name": "@livestore/common:LeaderSyncProcessor:push",
298
- "attributes": {
299
- "batch": "undefined",
300
- "batchSize": 1,
301
- },
302
- },
303
- {
304
- "_name": "client-session-sync-processor:pull",
305
- "attributes": {
306
- "code.stacktrace": "<STACKTRACE>",
307
- "span.label": "⚠︎ Interrupted",
308
- "status.interrupted": true,
309
- },
310
- },
311
- {
312
- "_name": "LiveStore:sync",
655
+ "_name": "client-session-sync-processor:boot",
656
+ "children": [
657
+ {
658
+ "_name": "@livestore/common:LeaderSyncProcessor:push",
659
+ "attributes": {
660
+ "batch": "undefined",
661
+ "batchSize": 1,
662
+ },
663
+ },
664
+ {
665
+ "_name": "@livestore/common:LeaderSyncProcessor:push",
666
+ "attributes": {
667
+ "batch": "undefined",
668
+ "batchSize": 1,
669
+ },
670
+ },
671
+ {
672
+ "_name": "client-session-sync-processor:pull",
673
+ "attributes": {
674
+ "code.stacktrace": "<STACKTRACE>",
675
+ "span.label": "⚠︎ Interrupted",
676
+ "status.interrupted": true,
677
+ },
678
+ },
679
+ ],
313
680
  },
314
681
  {
315
682
  "_name": "LiveStore:commits",
@@ -320,14 +687,14 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 1`] = `
320
687
  {
321
688
  "_name": "LiveStore.subscribe",
322
689
  "attributes": {
323
- "queryLabel": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
690
+ "queryLabel": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
324
691
  },
325
692
  "children": [
326
693
  {
327
- "_name": "db:SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
694
+ "_name": "db:SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ",
328
695
  "attributes": {
329
696
  "livestore.debugRefreshReason": "subscribe-initial-run:undefined",
330
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
697
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
331
698
  "sql.rowsCount": 0,
332
699
  },
333
700
  "children": [
@@ -335,17 +702,17 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 1`] = `
335
702
  "_name": "sql-in-memory-select",
336
703
  "attributes": {
337
704
  "sql.cached": false,
338
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
705
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
339
706
  "sql.rowsCount": 0,
340
707
  },
341
708
  },
342
709
  ],
343
710
  },
344
711
  {
345
- "_name": "db:SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
712
+ "_name": "db:SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ",
346
713
  "attributes": {
347
714
  "livestore.debugRefreshReason": "commit",
348
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
715
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
349
716
  "sql.rowsCount": 1,
350
717
  },
351
718
  "children": [
@@ -353,7 +720,7 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 1`] = `
353
720
  "_name": "sql-in-memory-select",
354
721
  "attributes": {
355
722
  "sql.cached": false,
356
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
723
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
357
724
  "sql.rowsCount": 1,
358
725
  },
359
726
  },
@@ -364,14 +731,14 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 1`] = `
364
731
  {
365
732
  "_name": "LiveStore.subscribe",
366
733
  "attributes": {
367
- "queryLabel": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
734
+ "queryLabel": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
368
735
  },
369
736
  "children": [
370
737
  {
371
- "_name": "db:SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
738
+ "_name": "db:SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ",
372
739
  "attributes": {
373
740
  "livestore.debugRefreshReason": "commit",
374
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
741
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
375
742
  "sql.rowsCount": 1,
376
743
  },
377
744
  "children": [
@@ -379,7 +746,7 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 1`] = `
379
746
  "_name": "sql-in-memory-select",
380
747
  "attributes": {
381
748
  "sql.cached": false,
382
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
749
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
383
750
  "sql.rowsCount": 1,
384
751
  },
385
752
  },
@@ -405,14 +772,10 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 2`] = `
405
772
  },
406
773
  "children": [
407
774
  {
408
- "_name": "client-session-sync-processor:push",
409
- "attributes": {
410
- "batchSize": 1,
411
- "eventCounts": "{
412
- "todo.created": 1
413
- }",
414
- "mergeResultTag": "advance",
415
- },
775
+ "_name": "client-session-sync-processor:encode-events",
776
+ },
777
+ {
778
+ "_name": "client-session-sync-processor:materialize-events",
416
779
  "children": [
417
780
  {
418
781
  "_name": "client-session-sync-processor:materialize-event",
@@ -420,13 +783,23 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 2`] = `
420
783
  {
421
784
  "_name": "livestore.in-memory-db:execute",
422
785
  "attributes": {
423
- "sql.query": "INSERT INTO 'todos' (id, text, completed) VALUES (?, ?, ?)",
786
+ "sql.query": "INSERT INTO 'todos' ("id", "text", "completed") VALUES (?, ?, ?)",
424
787
  },
425
788
  },
426
789
  ],
427
790
  },
428
791
  ],
429
792
  },
793
+ {
794
+ "_name": "client-session-sync-processor:push",
795
+ "attributes": {
796
+ "batchSize": 1,
797
+ "eventCounts": "{
798
+ "todo.created": 1
799
+ }",
800
+ "mergeResultTag": "advance",
801
+ },
802
+ },
430
803
  ],
431
804
  },
432
805
  {
@@ -439,14 +812,10 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 2`] = `
439
812
  },
440
813
  "children": [
441
814
  {
442
- "_name": "client-session-sync-processor:push",
443
- "attributes": {
444
- "batchSize": 1,
445
- "eventCounts": "{
446
- "todo.created": 1
447
- }",
448
- "mergeResultTag": "advance",
449
- },
815
+ "_name": "client-session-sync-processor:encode-events",
816
+ },
817
+ {
818
+ "_name": "client-session-sync-processor:materialize-events",
450
819
  "children": [
451
820
  {
452
821
  "_name": "client-session-sync-processor:materialize-event",
@@ -454,13 +823,23 @@ exports[`otel > QueryBuilder subscription - unsubscribe functionality 2`] = `
454
823
  {
455
824
  "_name": "livestore.in-memory-db:execute",
456
825
  "attributes": {
457
- "sql.query": "INSERT INTO 'todos' (id, text, completed) VALUES (?, ?, ?)",
826
+ "sql.query": "INSERT INTO 'todos' ("id", "text", "completed") VALUES (?, ?, ?)",
458
827
  },
459
828
  },
460
829
  ],
461
830
  },
462
831
  ],
463
832
  },
833
+ {
834
+ "_name": "client-session-sync-processor:push",
835
+ "attributes": {
836
+ "batchSize": 1,
837
+ "eventCounts": "{
838
+ "todo.created": 1
839
+ }",
840
+ "mergeResultTag": "advance",
841
+ },
842
+ },
464
843
  ],
465
844
  },
466
845
  ]
@@ -474,6 +853,9 @@ exports[`otel > otel 3`] = `
474
853
  "storeId": "default",
475
854
  },
476
855
  "children": [
856
+ {
857
+ "_name": "makeClientSessionSyncProcessor",
858
+ },
477
859
  {
478
860
  "_name": "livestore.in-memory-db:execute",
479
861
  "attributes": {
@@ -487,22 +869,24 @@ exports[`otel > otel 3`] = `
487
869
  },
488
870
  },
489
871
  {
490
- "_name": "@livestore/common:LeaderSyncProcessor:push",
491
- "attributes": {
492
- "batch": "undefined",
493
- "batchSize": 1,
494
- },
495
- },
496
- {
497
- "_name": "client-session-sync-processor:pull",
498
- "attributes": {
499
- "code.stacktrace": "<STACKTRACE>",
500
- "span.label": "⚠︎ Interrupted",
501
- "status.interrupted": true,
502
- },
503
- },
504
- {
505
- "_name": "LiveStore:sync",
872
+ "_name": "client-session-sync-processor:boot",
873
+ "children": [
874
+ {
875
+ "_name": "@livestore/common:LeaderSyncProcessor:push",
876
+ "attributes": {
877
+ "batch": "undefined",
878
+ "batchSize": 1,
879
+ },
880
+ },
881
+ {
882
+ "_name": "client-session-sync-processor:pull",
883
+ "attributes": {
884
+ "code.stacktrace": "<STACKTRACE>",
885
+ "span.label": "⚠︎ Interrupted",
886
+ "status.interrupted": true,
887
+ },
888
+ },
889
+ ],
506
890
  },
507
891
  {
508
892
  "_name": "LiveStore:commits",
@@ -562,14 +946,10 @@ exports[`otel > otel 4`] = `
562
946
  },
563
947
  "children": [
564
948
  {
565
- "_name": "client-session-sync-processor:push",
566
- "attributes": {
567
- "batchSize": 1,
568
- "eventCounts": "{
569
- "todo.created": 1
570
- }",
571
- "mergeResultTag": "advance",
572
- },
949
+ "_name": "client-session-sync-processor:encode-events",
950
+ },
951
+ {
952
+ "_name": "client-session-sync-processor:materialize-events",
573
953
  "children": [
574
954
  {
575
955
  "_name": "client-session-sync-processor:materialize-event",
@@ -577,13 +957,23 @@ exports[`otel > otel 4`] = `
577
957
  {
578
958
  "_name": "livestore.in-memory-db:execute",
579
959
  "attributes": {
580
- "sql.query": "INSERT INTO 'todos' (id, text, completed) VALUES (?, ?, ?)",
960
+ "sql.query": "INSERT INTO 'todos' ("id", "text", "completed") VALUES (?, ?, ?)",
581
961
  },
582
962
  },
583
963
  ],
584
964
  },
585
965
  ],
586
966
  },
967
+ {
968
+ "_name": "client-session-sync-processor:push",
969
+ "attributes": {
970
+ "batchSize": 1,
971
+ "eventCounts": "{
972
+ "todo.created": 1
973
+ }",
974
+ "mergeResultTag": "advance",
975
+ },
976
+ },
587
977
  ],
588
978
  },
589
979
  ]
@@ -769,6 +1159,9 @@ exports[`otel > with thunks 7`] = `
769
1159
  "storeId": "default",
770
1160
  },
771
1161
  "children": [
1162
+ {
1163
+ "_name": "makeClientSessionSyncProcessor",
1164
+ },
772
1165
  {
773
1166
  "_name": "livestore.in-memory-db:execute",
774
1167
  "attributes": {
@@ -782,22 +1175,24 @@ exports[`otel > with thunks 7`] = `
782
1175
  },
783
1176
  },
784
1177
  {
785
- "_name": "@livestore/common:LeaderSyncProcessor:push",
786
- "attributes": {
787
- "batch": "undefined",
788
- "batchSize": 1,
789
- },
790
- },
791
- {
792
- "_name": "client-session-sync-processor:pull",
793
- "attributes": {
794
- "code.stacktrace": "<STACKTRACE>",
795
- "span.label": "⚠︎ Interrupted",
796
- "status.interrupted": true,
797
- },
798
- },
799
- {
800
- "_name": "LiveStore:sync",
1178
+ "_name": "client-session-sync-processor:boot",
1179
+ "children": [
1180
+ {
1181
+ "_name": "@livestore/common:LeaderSyncProcessor:push",
1182
+ "attributes": {
1183
+ "batch": "undefined",
1184
+ "batchSize": 1,
1185
+ },
1186
+ },
1187
+ {
1188
+ "_name": "client-session-sync-processor:pull",
1189
+ "attributes": {
1190
+ "code.stacktrace": "<STACKTRACE>",
1191
+ "span.label": "⚠︎ Interrupted",
1192
+ "status.interrupted": true,
1193
+ },
1194
+ },
1195
+ ],
801
1196
  },
802
1197
  {
803
1198
  "_name": "LiveStore:commits",
@@ -863,14 +1258,10 @@ exports[`otel > with thunks 8`] = `
863
1258
  },
864
1259
  "children": [
865
1260
  {
866
- "_name": "client-session-sync-processor:push",
867
- "attributes": {
868
- "batchSize": 1,
869
- "eventCounts": "{
870
- "todo.created": 1
871
- }",
872
- "mergeResultTag": "advance",
873
- },
1261
+ "_name": "client-session-sync-processor:encode-events",
1262
+ },
1263
+ {
1264
+ "_name": "client-session-sync-processor:materialize-events",
874
1265
  "children": [
875
1266
  {
876
1267
  "_name": "client-session-sync-processor:materialize-event",
@@ -878,13 +1269,23 @@ exports[`otel > with thunks 8`] = `
878
1269
  {
879
1270
  "_name": "livestore.in-memory-db:execute",
880
1271
  "attributes": {
881
- "sql.query": "INSERT INTO 'todos' (id, text, completed) VALUES (?, ?, ?)",
1272
+ "sql.query": "INSERT INTO 'todos' ("id", "text", "completed") VALUES (?, ?, ?)",
882
1273
  },
883
1274
  },
884
1275
  ],
885
1276
  },
886
1277
  ],
887
1278
  },
1279
+ {
1280
+ "_name": "client-session-sync-processor:push",
1281
+ "attributes": {
1282
+ "batchSize": 1,
1283
+ "eventCounts": "{
1284
+ "todo.created": 1
1285
+ }",
1286
+ "mergeResultTag": "advance",
1287
+ },
1288
+ },
888
1289
  ],
889
1290
  },
890
1291
  ]
@@ -898,6 +1299,9 @@ exports[`otel > with thunks with query builder and without labels 3`] = `
898
1299
  "storeId": "default",
899
1300
  },
900
1301
  "children": [
1302
+ {
1303
+ "_name": "makeClientSessionSyncProcessor",
1304
+ },
901
1305
  {
902
1306
  "_name": "livestore.in-memory-db:execute",
903
1307
  "attributes": {
@@ -911,22 +1315,24 @@ exports[`otel > with thunks with query builder and without labels 3`] = `
911
1315
  },
912
1316
  },
913
1317
  {
914
- "_name": "@livestore/common:LeaderSyncProcessor:push",
915
- "attributes": {
916
- "batch": "undefined",
917
- "batchSize": 1,
918
- },
919
- },
920
- {
921
- "_name": "client-session-sync-processor:pull",
922
- "attributes": {
923
- "code.stacktrace": "<STACKTRACE>",
924
- "span.label": "⚠︎ Interrupted",
925
- "status.interrupted": true,
926
- },
927
- },
928
- {
929
- "_name": "LiveStore:sync",
1318
+ "_name": "client-session-sync-processor:boot",
1319
+ "children": [
1320
+ {
1321
+ "_name": "@livestore/common:LeaderSyncProcessor:push",
1322
+ "attributes": {
1323
+ "batch": "undefined",
1324
+ "batchSize": 1,
1325
+ },
1326
+ },
1327
+ {
1328
+ "_name": "client-session-sync-processor:pull",
1329
+ "attributes": {
1330
+ "code.stacktrace": "<STACKTRACE>",
1331
+ "span.label": "⚠︎ Interrupted",
1332
+ "status.interrupted": true,
1333
+ },
1334
+ },
1335
+ ],
930
1336
  },
931
1337
  {
932
1338
  "_name": "LiveStore:commits",
@@ -935,9 +1341,9 @@ exports[`otel > with thunks with query builder and without labels 3`] = `
935
1341
  "_name": "LiveStore:queries",
936
1342
  "children": [
937
1343
  {
938
- "_name": "db:SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
1344
+ "_name": "db:SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ",
939
1345
  "attributes": {
940
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
1346
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
941
1347
  "sql.rowsCount": 0,
942
1348
  },
943
1349
  "children": [
@@ -948,16 +1354,16 @@ exports[`otel > with thunks with query builder and without labels 3`] = `
948
1354
  "_name": "sql-in-memory-select",
949
1355
  "attributes": {
950
1356
  "sql.cached": false,
951
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
1357
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
952
1358
  "sql.rowsCount": 0,
953
1359
  },
954
1360
  },
955
1361
  ],
956
1362
  },
957
1363
  {
958
- "_name": "db:SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
1364
+ "_name": "db:SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ",
959
1365
  "attributes": {
960
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
1366
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
961
1367
  "sql.rowsCount": 1,
962
1368
  },
963
1369
  "children": [
@@ -968,7 +1374,7 @@ exports[`otel > with thunks with query builder and without labels 3`] = `
968
1374
  "_name": "sql-in-memory-select",
969
1375
  "attributes": {
970
1376
  "sql.cached": false,
971
- "sql.query": "SELECT * FROM 'todos' WHERE completed = ? LIMIT ?",
1377
+ "sql.query": "SELECT * FROM 'todos' WHERE "completed" = ? LIMIT ?",
972
1378
  "sql.rowsCount": 1,
973
1379
  },
974
1380
  },
@@ -992,14 +1398,10 @@ exports[`otel > with thunks with query builder and without labels 4`] = `
992
1398
  },
993
1399
  "children": [
994
1400
  {
995
- "_name": "client-session-sync-processor:push",
996
- "attributes": {
997
- "batchSize": 1,
998
- "eventCounts": "{
999
- "todo.created": 1
1000
- }",
1001
- "mergeResultTag": "advance",
1002
- },
1401
+ "_name": "client-session-sync-processor:encode-events",
1402
+ },
1403
+ {
1404
+ "_name": "client-session-sync-processor:materialize-events",
1003
1405
  "children": [
1004
1406
  {
1005
1407
  "_name": "client-session-sync-processor:materialize-event",
@@ -1007,13 +1409,23 @@ exports[`otel > with thunks with query builder and without labels 4`] = `
1007
1409
  {
1008
1410
  "_name": "livestore.in-memory-db:execute",
1009
1411
  "attributes": {
1010
- "sql.query": "INSERT INTO 'todos' (id, text, completed) VALUES (?, ?, ?)",
1412
+ "sql.query": "INSERT INTO 'todos' ("id", "text", "completed") VALUES (?, ?, ?)",
1011
1413
  },
1012
1414
  },
1013
1415
  ],
1014
1416
  },
1015
1417
  ],
1016
1418
  },
1419
+ {
1420
+ "_name": "client-session-sync-processor:push",
1421
+ "attributes": {
1422
+ "batchSize": 1,
1423
+ "eventCounts": "{
1424
+ "todo.created": 1
1425
+ }",
1426
+ "mergeResultTag": "advance",
1427
+ },
1428
+ },
1017
1429
  ],
1018
1430
  },
1019
1431
  ]