Repository navigation
Commit 62bce5c
fix(driver-turso): refuse transactions on the remote face instead of silently dropping them (#18717)
Fixes #18616
Clause-②: yes
The Turso **remote** face now refuses transactions with
`NOT_IMPLEMENTED` / `501` instead of accepting them and doing nothing
with them. Local and embedded-replica modes are byte-for-byte unchanged
in behaviour.
## What was wrong
`@objectstack/spec`'s `driver.zod.ts` states the delivery mechanism
verbatim:
> A transaction handle to be passed to subsequent operations via
`options.transaction`.
On the remote transport nothing could receive it. ⭐ Every reading below
was **re-derived by content on this branch's base** `f8eaf670454a`,
which contains `ef67b47afb` (PR #18668) — that PR edited
`remote-transport.ts` after the card was written, so the card's line
numbers no longer locate anything:
| reading | instrument | result |
|:--|:--|:--|
| `RemoteTransport` members naming a transaction | signature scan of
`remote-transport.ts` | **3** — `beginTransaction()`, `commit(t)`,
`rollback(t)` |
| `RemoteTransport` **data** methods accepting `options` or a
transaction | same file, same instrument | **0** |
| ⭐ firing control — data methods present at all in that file | same
file | **13** (`find`, `findOne`, `aggregate`, `create`, `update`,
`upsert`, `delete`, `count`, `bulkCreate`, `bulkUpdate`, `bulkDelete`,
`updateMany`, `deleteMany`) ⇒ the zero is a reading, not a dead grep |
| `this.isRemote` guards in `turso-driver.ts` | `git grep -c` | **26** —
matches the card |
1 parent 5762eaf commit 62bce5c
3 files changed
Lines changed: 539 additions & 3 deletions
File tree
- .changeset
- packages/drivers/driver-turso/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments