feat(sqlite): port job crate to SQLite backend#48
Draft
bodymindarts wants to merge 5 commits intomainfrom
Draft
Conversation
f4924d5 to
10591e5
Compare
Migrate the job crate to work exclusively with SQLite via the es-entity sqlite branch. Key changes: - Rewrite all SQL from Postgres to SQLite syntax (? params, TEXT types, no ENUM/INTERVAL/UNNEST/FOR UPDATE) - Remove PgListener (LISTEN/NOTIFY) — use timer-based polling with real-time fallback to avoid deadlocks with manual clocks - Convert compile-time sqlx::query!() to runtime sqlx::query() - Change JobType inner type from Cow<'static, str> to String to fix sqlx Encode lifetime issues with the EsRepo derive macro - Handle SQLite constraint errors (no structured constraint names) by parsing error messages and extended error codes - Use shared-cache in-memory SQLite for tests - Delete .sqlx query cache (no longer needed with runtime queries) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace local path dependency with a git branch reference so the build works in CI and nix sandboxed environments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add nextest-sqlite package to flake.nix and update the GitHub Actions test workflow to run SQLite tests via nix run .#nextest-sqlite, matching the es-entity sqlite branch CI pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a514a9d to
e6c03e8
Compare
Port the cancel_job SQL query from Postgres ($1) to SQLite (?) parameter syntax and add the .sqlx offline cache file. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e6c03e8 to
4273cf6
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.
Summary
task/sqlite-backend-019cdf3dbranchsqlx::query!()to runtimesqlx::query()to match es-entity-macros-sqlitenextest-sqliteCI workflow matching the es-entity patternTest plan
cargo nextest runcargo clippy --all-targets -- -D warningscleancargo fmt -- --checkcleannix run .#nextest-sqlitevia GitHub Actions🤖 Generated with Claude Code