Skip to content

Add sqlx offline query cache - #22

Merged
SWvheerden merged 1 commit into
mainfrom
sw_sqlx_offline_cache
Sep 1, 2026
Merged

Add sqlx offline query cache#22
SWvheerden merged 1 commit into
mainfrom
sw_sqlx_offline_cache

Conversation

@SWvheerden

Copy link
Copy Markdown
Contributor

Commit the .sqlx query cache so the crate builds without a live database. Previously an unset DATABASE_URL (no .env present) caused all 30 query!/query_as! macros to fail, and the .sqlx directory was empty so the offline fallback was unavailable.

Builds now work with SQLX_OFFLINE=true and no .env.

Regenerate after changing any query or migration:
cargo sqlx prepare --workspace

Commit the .sqlx query cache so the crate builds without a live
database. Previously an unset DATABASE_URL (no .env present) caused
all 30 query!/query_as! macros to fail, and the .sqlx directory was
empty so the offline fallback was unavailable.

Builds now work with SQLX_OFFLINE=true and no .env.

Regenerate after changing any query or migration:
  cargo sqlx prepare --workspace

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@SWvheerden
SWvheerden merged commit bf3114b into main Sep 1, 2026
2 checks passed
@SWvheerden
SWvheerden deleted the sw_sqlx_offline_cache branch September 3, 2026 12:02
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.

1 participant