feat(database): server runtime — drizzle pool, OBO, transactions, hooks#355
Draft
ditadi wants to merge 12 commits intostack/database/foundationfrom
Draft
feat(database): server runtime — drizzle pool, OBO, transactions, hooks#355ditadi wants to merge 12 commits intostack/database/foundationfrom
ditadi wants to merge 12 commits intostack/database/foundationfrom
Conversation
This was referenced May 6, 2026
b7bf127 to
3d25e45
Compare
Pool-backed Drizzle behind DataPath; Data API stays opt-in only.
…outes Plain POST remains insert-only.
…s, txn cap, hook tests
…ing after foundation cleanup
…rden lookup; normalize OBO
3d25e45 to
caa5080
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🥞 Stacked PR
Use this link to review incremental changes.
Server-side runtime for the database plugin. Moves the entity API onto a Drizzle-backed Postgres pool and adds the multi-tenant execution primitives.
Drizzle-backed entity runtime
Switches entity operations from the Data API to a Drizzle/Postgres pool, adds typed coercion, health checks, route hardening, and PostgREST-style include/upsert semantics.
OBO, transactions, and SQL escape hatch
Adds
appkit.database.transaction(fn), taggedsqlexecution, andasUser(req)execution scoped to the caller. Per-user OBO pools setapp.user_idon connection for RLS-aware queries.Safety and shutdown
Hides private columns from default reads and routes, drains evicted user pools, caps
toArray(), scrubs route errors, and tightens pool fan-out.Test plan
PR Stack
appkit db initonboarding — feat(cli): appkit db init — one-command lakebase onboarding #357