feat(query): support SQLite statement conflict policies #3

Open
toad wants to merge 5 commits from feat/sqlite-statement-conflicts into feat/sqlite-table-semantics
Member

OpenSpec

Change: sqlite-statement-conflicts (spec-driven). 7/7 tasks complete.

Scope

  • Typed .or("ABORT" | "FAIL" | "IGNORE" | "REPLACE") on INSERT and UPDATE, compatible with RETURNING and UPDATE WHERE. OR ROLLBACK and UPSERT excluded.
  • SQL generators render policies before table targets while preserving no-policy statements.
  • Bun SQLite tests cover unique/NOT NULL conflict effects, RETURNING, type-chain inference and rollback rejection.
  • README documents use, SQLite limits, and Bun result behavior; authoritative full-SQLite plan updated. Change artifacts included.

Checkpoints

  • 2d93d14 implementation and tests.
  • 31155dc documentation and completed OpenSpec artifacts.
  • ec5db98 Merge parent branch transaction fix without history rewrite.
  • 389ea02 Test statement conflict policies in nested transactions.

Verification

  • bun run check: passed after parent fix.
  • bun run lint: 0 errors, 14 existing warnings.
  • bun test: 107 passed, 0 failed.
  • openspec validate sqlite-statement-conflicts: passed; apply progress 7/7.
  • git diff --check: passed.

Cloudflare D1 behavior not independently exercised; SQLite runtime semantics tested with Bun.

## OpenSpec Change: `sqlite-statement-conflicts` (spec-driven). 7/7 tasks complete. ## Scope - Typed `.or("ABORT" | "FAIL" | "IGNORE" | "REPLACE")` on INSERT and UPDATE, compatible with RETURNING and UPDATE WHERE. OR ROLLBACK and UPSERT excluded. - SQL generators render policies before table targets while preserving no-policy statements. - Bun SQLite tests cover unique/NOT NULL conflict effects, RETURNING, type-chain inference and rollback rejection. - README documents use, SQLite limits, and Bun result behavior; authoritative full-SQLite plan updated. Change artifacts included. ## Checkpoints - `2d93d14` implementation and tests. - `31155dc` documentation and completed OpenSpec artifacts. - `ec5db98` Merge parent branch transaction fix without history rewrite. - `389ea02` Test statement conflict policies in nested transactions. ## Verification - `bun run check`: passed after parent fix. - `bun run lint`: 0 errors, 14 existing warnings. - `bun test`: 107 passed, 0 failed. - `openspec validate sqlite-statement-conflicts`: passed; apply progress 7/7. - `git diff --check`: passed. Cloudflare D1 behavior not independently exercised; SQLite runtime semantics tested with Bun.
feat(query): support SQLite statement conflict policies
All checks were successful
Checks / checks (pull_request) Successful in 7s
Checks / release (pull_request) Has been skipped
2d93d14689
docs(query): document statement conflicts and complete spec
All checks were successful
Checks / checks (pull_request) Successful in 6s
Checks / release (pull_request) Has been skipped
31155dc04f
test(query): cover conflict policies in nested transactions
All checks were successful
Checks / checks (pull_request) Successful in 7s
Checks / release (pull_request) Has been skipped
389ea02871
chore: gitignore update
All checks were successful
Checks / checks (pull_request) Successful in 6s
Checks / release (pull_request) Has been skipped
08d1a9ca5a
All checks were successful
Checks / checks (pull_request) Successful in 6s
Checks / release (pull_request) Has been skipped
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/sqlite-statement-conflicts:feat/sqlite-statement-conflicts
git switch feat/sqlite-statement-conflicts

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch feat/sqlite-table-semantics
git merge --no-ff feat/sqlite-statement-conflicts
git switch feat/sqlite-statement-conflicts
git rebase feat/sqlite-table-semantics
git switch feat/sqlite-table-semantics
git merge --ff-only feat/sqlite-statement-conflicts
git switch feat/sqlite-statement-conflicts
git rebase feat/sqlite-table-semantics
git switch feat/sqlite-table-semantics
git merge --no-ff feat/sqlite-statement-conflicts
git switch feat/sqlite-table-semantics
git merge --squash feat/sqlite-statement-conflicts
git switch feat/sqlite-table-semantics
git merge --ff-only feat/sqlite-statement-conflicts
git switch feat/sqlite-table-semantics
git merge feat/sqlite-statement-conflicts
git push origin feat/sqlite-table-semantics
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sigitex/outlaw!3
No description provided.