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
If possible, it will be useful to add a way to prepare/cache the whole database structure (all tables/columns), instead of only used queries. This would allow to have the database mapped once and continue with development without the need to update cached file after each new/changed query in code.
This can be added as additional parameter, for example cargo sqlx prepare full
The text was updated successfully, but these errors were encountered:
Caching the schema would not be useful to the macros as they do not analyze SQL themselves; it's necessary to pass the SQL to the database engine for parsing and analysis. If we wanted to analyze the SQL ourselves we would essentially be reimplementing a good chunk of the server frontend for every database flavor we intend to support (since each has a different feature set and different subsets of the SQL standard it supports). Not exactly trivial.
There's discussion about making query data caching more automatic in #570. Otherwise, I'm closing this issue as not currently actionable.
If possible, it will be useful to add a way to prepare/cache the whole database structure (all tables/columns), instead of only used queries. This would allow to have the database mapped once and continue with development without the need to update cached file after each new/changed query in code.
This can be added as additional parameter, for example
cargo sqlx prepare full
The text was updated successfully, but these errors were encountered: