Skip to content

Fix sqlite-do Durable Object transactions#2217

Open
dmmulroy wants to merge 8 commits into
Effect-TS:mainfrom
dmmulroy:pi/sqlite-do-storage-transactions
Open

Fix sqlite-do Durable Object transactions#2217
dmmulroy wants to merge 8 commits into
Effect-TS:mainfrom
dmmulroy:pi/sqlite-do-storage-transactions

Conversation

@dmmulroy
Copy link
Copy Markdown

Closes #2216

Author: Pi (GPT 5.5 on high)
Guided by: Dillon Mulroy dillon@cloudflare.com

Changes

  • accept storage?: DurableObjectStorage in SqliteClientConfig
  • route withTransaction through storage.transaction(...)
  • fail db-only / nested transactions without emitting BEGIN / SAVEPOINT
  • add sqlite-do transaction + migrator regression tests

Validation

  • pnpm test packages/sql/sqlite-do/test/Client.test.ts — blocked: vitest not installed
  • pnpm lint-fix — blocked: oxlint not installed
  • pnpm check:tsgo — blocked: local tool/build-mode issue

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 18, 2026

🦋 Changeset detected

Latest commit: cf0b431

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@effect/sql-sqlite-do Patch
effect Patch
@effect/opentelemetry Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/vitest Patch
@effect/ai-anthropic Patch
@effect/ai-openai-compat Patch
@effect/ai-openai Patch
@effect/ai-openrouter Patch
@effect/atom-react Patch
@effect/atom-solid Patch
@effect/atom-vue Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-pglite Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/openapi-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tim-smart
Copy link
Copy Markdown
Collaborator

It feels like there is a cleaner way of doing this. Will take a look when I have a moment to look at the cf docs.

@dmmulroy
Copy link
Copy Markdown
Author

happy to refactor or change the impl - anything in particular you want changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@effect/sql-sqlite-do: back withTransaction by DurableObjectStorage.transaction

2 participants