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
Is your feature request related to a problem? Please describe.
At the moment, SQLx live query checks rely on the DATABASE_URL environment variable, which is hardcoded in the macro code. This causes issues when building out more complex systems, where environment variables are automaticelly separated by underscores and parsed into configuration structs and other advanced features that may collide with this fixed env variable.
Describe the solution you'd like
I propose a way that allows us to configure how this environment variable is named,
maybe through a configuration parameter int the Cargo.toml or via a separate environment variable called something like SQLX_DATABASE_URL_ENVIRONMENT_KEY
Describe alternatives you've considered
There are no alternatives available that allow me to change the environment variable, other than forking the whole crate.
Additional context
I'd be happy to create a PR for this
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
At the moment, SQLx live query checks rely on the
DATABASE_URL
environment variable, which is hardcoded in the macro code. This causes issues when building out more complex systems, where environment variables are automaticelly separated by underscores and parsed into configuration structs and other advanced features that may collide with this fixed env variable.Describe the solution you'd like
I propose a way that allows us to configure how this environment variable is named,
maybe through a configuration parameter int the
Cargo.toml
or via a separate environment variable called something likeSQLX_DATABASE_URL_ENVIRONMENT_KEY
Describe alternatives you've considered
There are no alternatives available that allow me to change the environment variable, other than forking the whole crate.
Additional context
I'd be happy to create a PR for this
The text was updated successfully, but these errors were encountered: