Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store offline data in one file per query / remove sqlx-data.json #1183

Closed
wants to merge 4 commits into from

Conversation

jplatte
Copy link
Contributor

@jplatte jplatte commented Apr 20, 2021

Query data is now stored in .sqlx/{query_hash}.json directly by the macro invocations, rather than first writing to target/sqlx/{input_span_hash}.json and then collecting those into sqlx-data.json separately.

  • save offline data (if .sqlx exists)
  • load offline data
  • create .sqlx when running cargo sqlx prepare
  • diff target/sqlx with .sqlx in cargo sqlx prepare --check
  • add / update tests
  • update documentation

Closes #570.

by doing all .env and environment variable reading inside a Lazy initializer.
Before, rust-analyzer was always hitting the
"only one runtime can be enabled" compile_error in sqlx-rt.
Query data is now stored in .sqlx/{query_hash}.json directly by the macro
invocations, rather than first writing to target/sqlx/{input_span_hash}.json
and then collecting those into sqlx-data.json separately.
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.

Move to one-file-per-query for sqlx-cli prepare
1 participant