feat(schema): support advanced SQLite indexes #4

Open
toad wants to merge 3 commits from feat/sqlite-advanced-indexes into feat/sqlite-statement-conflicts
Member

OpenSpec

Change: sqlite-advanced-indexes (spec-driven). Proposal, design, spec, and all 7/7 completed tasks included; strict OpenSpec validation passed.

Scope

  • Ordered serializable column/expression index terms with optional ASC/DESC, partial predicates, one owning table for all column terms, and explicit ownership for expression-only indexes.
  • Ordinary, unique, and composite indexes remain available. SQLite generator emits ordered terms and optional WHERE; Cowboy persists definitions, recreates changed indexes, restores unchanged indexes destroyed by table rebuilds, skips surviving no-op restarts, and removes stale tracked indexes.
  • Type, generated SQL, in-memory execution and populated-rebuild tests; README documents API, trusted raw-SQL limits and SQLite runtime requirements. Authoritative docs/plans/full-sqlite.md updated.

Checkpoints

  • 5fe0428 index builder, metadata, generator and existing fixture.
  • 1f83260 type, SQL, execution and migration tests.
  • 302b02eb1546c34d1557b10a8dbe2f885b58d260 documentation, source plan and completed OpenSpec artifacts.

Verification

  • openspec status, apply instructions, proposal, design, tasks and spec reviewed; openspec validate sqlite-advanced-indexes passed (7/7).
  • Reviewed change-only diff against feat/sqlite-statement-conflicts, including builder, generator, Cowboy interactions, tests, documentation, trusted-SQL guidance and added-diff secret scan; no exposed secrets found.
  • Focused Bun tests: 86 passed. Full suite (including earlier stacked changes): 111 passed, 0 failed.
  • bun run check: passed for source, Bun, Cloudflare and tests. bun run lint: 0 errors, 14 pre-existing warnings (including warning in test file that predates this branch).
  • Base-branch diff whitespace check passed. Working tree clean; all three checkpoints pushed.

SQLite execution and rebuild tests run on Bun in-memory SQLite; no live Cloudflare D1 claim.

## OpenSpec Change: `sqlite-advanced-indexes` (spec-driven). Proposal, design, spec, and all 7/7 completed tasks included; strict OpenSpec validation passed. ## Scope - Ordered serializable column/expression index terms with optional ASC/DESC, partial predicates, one owning table for all column terms, and explicit ownership for expression-only indexes. - Ordinary, unique, and composite indexes remain available. SQLite generator emits ordered terms and optional WHERE; Cowboy persists definitions, recreates changed indexes, restores unchanged indexes destroyed by table rebuilds, skips surviving no-op restarts, and removes stale tracked indexes. - Type, generated SQL, in-memory execution and populated-rebuild tests; README documents API, trusted raw-SQL limits and SQLite runtime requirements. Authoritative `docs/plans/full-sqlite.md` updated. ## Checkpoints - `5fe0428` index builder, metadata, generator and existing fixture. - `1f83260` type, SQL, execution and migration tests. - `302b02eb1546c34d1557b10a8dbe2f885b58d260` documentation, source plan and completed OpenSpec artifacts. ## Verification - `openspec status`, apply instructions, proposal, design, tasks and spec reviewed; `openspec validate sqlite-advanced-indexes` passed (7/7). - Reviewed change-only diff against `feat/sqlite-statement-conflicts`, including builder, generator, Cowboy interactions, tests, documentation, trusted-SQL guidance and added-diff secret scan; no exposed secrets found. - Focused Bun tests: 86 passed. Full suite (including earlier stacked changes): 111 passed, 0 failed. - `bun run check`: passed for source, Bun, Cloudflare and tests. `bun run lint`: 0 errors, 14 pre-existing warnings (including warning in test file that predates this branch). - Base-branch diff whitespace check passed. Working tree clean; all three checkpoints pushed. SQLite execution and rebuild tests run on Bun in-memory SQLite; no live Cloudflare D1 claim.
feat: support ordered expression and partial indexes
All checks were successful
Checks / checks (pull_request) Successful in 7s
Checks / release (pull_request) Has been skipped
5fe0428275
test: cover advanced index convergence and rebuilds
All checks were successful
Checks / checks (pull_request) Successful in 7s
Checks / release (pull_request) Has been skipped
1f832603cd
docs: document advanced indexes and completed OpenSpec change
All checks were successful
Checks / checks (pull_request) Successful in 6s
Checks / release (pull_request) Has been skipped
302b02eb15
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-advanced-indexes:feat/sqlite-advanced-indexes
git switch feat/sqlite-advanced-indexes

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-statement-conflicts
git merge --no-ff feat/sqlite-advanced-indexes
git switch feat/sqlite-advanced-indexes
git rebase feat/sqlite-statement-conflicts
git switch feat/sqlite-statement-conflicts
git merge --ff-only feat/sqlite-advanced-indexes
git switch feat/sqlite-advanced-indexes
git rebase feat/sqlite-statement-conflicts
git switch feat/sqlite-statement-conflicts
git merge --no-ff feat/sqlite-advanced-indexes
git switch feat/sqlite-statement-conflicts
git merge --squash feat/sqlite-advanced-indexes
git switch feat/sqlite-statement-conflicts
git merge --ff-only feat/sqlite-advanced-indexes
git switch feat/sqlite-statement-conflicts
git merge feat/sqlite-advanced-indexes
git push origin feat/sqlite-statement-conflicts
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!4
No description provided.