Skip to content

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

Closed
jplatte wants to merge 4 commits into
transact-rs:masterfrom
lumeohq:rip-sqlx-data-json
Closed

jplatte wants to merge 4 commits into
transact-rs:masterfrom
lumeohq:rip-sqlx-data-json

Conversation

@jplatte

@jplatte jplatte commented Apr 20, 2021

Copy link
Copy Markdown
Contributor

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.

jplatte added 4 commits April 20, 2021 11:05
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