You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use migration files for compile time query checks, rather than live database
#4465
The problem of requiring a live database for building is well documented, and the use of prepared queries doesn't quite feel satisfactory, especially as they have to be kept in sync with the use of a live database anyway. I was wondering whether a possible feature could be to use the migration files to spin up an sqlx owned database in the target directory (in the case of sqlite), and use that to run the compile time query checks against. This seems similar to the mechanism used by sqlx::test. This would also have the advantage of working for ordinary development, and in theory wouldn't require a live database at all.
Apologies if this has been discussed before, I had a look around an couldn't find anything.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
The problem of requiring a live database for building is well documented, and the use of prepared queries doesn't quite feel satisfactory, especially as they have to be kept in sync with the use of a live database anyway. I was wondering whether a possible feature could be to use the migration files to spin up an sqlx owned database in the target directory (in the case of sqlite), and use that to run the compile time query checks against. This seems similar to the mechanism used by
sqlx::test. This would also have the advantage of working for ordinary development, and in theory wouldn't require a live database at all.Apologies if this has been discussed before, I had a look around an couldn't find anything.
All reactions