Skip to content

Compile-time support for external drivers #3889

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bobozaur
Copy link
Contributor

@bobozaur bobozaur commented Jun 6, 2025

Does your PR solve an issue?

Not on this repo, but it would solve an issue for the sqlx-exasol driver: bobozaur/sqlx-exasol#9.

With the changes here, the compile-time macros can be redefined by external drivers through usage of sqlx_macros_core::query::expand_input() with a custom QueryDriver. Furthermore, a sqlx-cli like binary can be exposed as well, since the install_default_drivers() call was moved to the sqlx-cli binaries. With these changes, the custom driver binary (that depends on sqlx-cli as a library) can install its own driver (this would panic with the current state of things).

Is this a breaking change?

Nope, it's internal only. Should not affect anything else at all.

@bobozaur
Copy link
Contributor Author

bobozaur commented Jun 6, 2025

Here's the PR from sqlx-exasol that makes use of these changes to implement compile-time query support and sqlx-cli like behavior: bobozaur/sqlx-exasol#35.

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.

1 participant