Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1395490
docs(db-adapter-conformance): plan the mutations and confirmation family
Nov 3, 2026
da23ed3
test(db): generate field removal in the optimistic-history oracle
Nov 3, 2026
30c3bfc
feat(db-adapter-conformance): the mutations family, with a reference …
Nov 3, 2026
8977b7b
test(db-adapter-conformance): model held sync copies and a provider's…
Nov 3, 2026
9443fb2
fix(rxdb-db-collection): persist writes in author order
Nov 3, 2026
af5df89
test(db-adapter-conformance): generate provider copies that differ fr…
Nov 3, 2026
1cf77ad
fix(rxdb-db-collection): require RxDB 17.6.0
Nov 3, 2026
c660428
test(db-adapter-conformance): field updates and confirmation through …
Nov 3, 2026
56dc133
fix(trailbase-db-collection): send removals, order writes, confirm by…
Nov 3, 2026
9ebd847
test(db-adapter-conformance): count only plan rewrites as server-rewr…
Nov 3, 2026
85e978e
fix(powersync-db-collection): persist writes in author order
Nov 3, 2026
2cbae92
test(db-adapter-conformance): a write is decided when the provider an…
Nov 3, 2026
6bc495b
fix(trailbase-db-collection): start the next write at the earlier res…
Nov 3, 2026
24bf6f0
revert(powersync-db-collection): keep writes pipelined behind the wri…
Nov 3, 2026
226b429
test(db-adapter-conformance): application handlers, log-ordered echoe…
Nov 3, 2026
76a00a9
test(electric-db-collection): run the mutation oracle over Electric's…
Nov 3, 2026
6dc0a3f
test(convex-db-collection): run the mutation oracle over the Convex c…
Nov 3, 2026
29681ad
test(db-adapter-conformance): generate same-key writes while one is p…
Nov 3, 2026
91c55a6
fix(trailbase-db-collection): confirm each write by its own change event
Nov 3, 2026
2b64a4a
fix(trailbase-db-collection): send a transaction's requests in order
Nov 3, 2026
1f8b749
fix(rxdb-db-collection): reject an update whose document is gone
Nov 3, 2026
a63ea94
test(db-adapter-conformance): model merged updates for RxDB
Nov 4, 2026
cba2ca6
docs(trailbase-db-collection): a removed field is NULL, not serialized
Nov 4, 2026
921888d
test(db-adapter-conformance): apply code simplification from review
Nov 4, 2026
46cc12e
Merge remote-tracking branch 'origin/main' into feat/adapter-conforma…
Nov 4, 2026
43cb8c9
chore(changeset): describe TrailBase's final write behavior
Nov 4, 2026
78e995b
ci: apply automated fixes
autofix-ci[bot] Nov 4, 2026
a4bbb87
test(rxdb-db-collection): rename the driver's storage-instance field
Nov 4, 2026
04aa70b
Merge autofix formatting into feat/adapter-conformance-mutations
Nov 4, 2026
08035f0
test(db): measure removed-field reach in each optimistic-history camp…
Nov 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/rxdb-ordered-writes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/rxdb-db-collection': patch
---

Persist writes to RxDB in the order the application made them. A write now starts only after the earlier write on the same collection fulfills or rejects. Before, a later write could reach RxDB while an earlier one was still pending. A rejected delete now rejects with RxDB's `RxError` for the write error, as a rejected insert does, instead of with an array of write errors.
5 changes: 5 additions & 0 deletions .changeset/rxdb-reject-missing-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/rxdb-db-collection': patch
---

Reject an update whose document no longer exists in RxDB, for example because another tab deleted it while the update waited. The update now fails with `UpdateKeyNotFoundError` and its optimistic change rolls back. Before, the adapter skipped it and reported success, so the write was silently lost.
5 changes: 5 additions & 0 deletions .changeset/rxdb-require-17-6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/rxdb-db-collection': patch
---

Require RxDB 17.6.0 or later. In RxDB 17.1.0 to 17.5.0, a storage write that throws stops RxDB's incremental write queue (pubkey/rxdb#9025), so the adapter's update never settles and every later update on the collection waits forever. RxDB 17.6.0 fixes this, and the adapter's update now rejects with the storage error.
10 changes: 10 additions & 0 deletions .changeset/trailbase-ordered-confirmed-writes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@tanstack/trailbase-db-collection': patch
---

Fix four write bugs.

- Removing a field in an update (for example `draft.note = undefined`) now sends `null`, so TrailBase clears the column. Before, the update omitted the field, and TrailBase kept the old value. The field's `serialize` function is not called for a removal.
- Writes now reach TrailBase in the order the application made them. A write starts only after TrailBase has answered the earlier write on the same collection. It does not wait for the earlier write's change event.
- A transaction's update and delete requests now go out one at a time, in mutation order. Before, they went out together, so after one was rejected the next write could start while another request was still unanswered. A rejection now ends the transaction, and its later requests are not sent.
- A write is now confirmed only by its own change event. Before, an earlier event for the same record could confirm a later write, so its optimistic value dropped and the earlier value showed until the later event arrived. This change also removes the adapter's periodic cleanup timer.
2 changes: 1 addition & 1 deletion docs/collections/trailbase-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The `trailBaseCollectionOptions` function accepts the following options:

- `schema`: [Standard Schema](https://standardschema.dev) compatible schema (e.g., Zod, Effect) for client-side validation
- `parse`: Object mapping field names to parsing functions that transform data coming from TrailBase
- `serialize`: Object mapping field names to serialization functions that transform data going to TrailBase
- `serialize`: Object mapping field names to serialization functions that transform data going to TrailBase. An update that removes a field (for example `draft.tags = undefined`) sends `null`, which clears the column, without calling that field's function. A `NOT NULL` column rejects such an update.
- `onInsert`: Handler function called when items are inserted
- `onUpdate`: Handler function called when items are updated
- `onDelete`: Handler function called when items are deleted
Expand Down
224 changes: 224 additions & 0 deletions docs/contributing/oracle-coverage.md

Large diffs are not rendered by default.

Loading
Loading