Skip to content
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

Compile-time query support #9

Open
bobozaur opened this issue Sep 4, 2023 · 0 comments
Open

Compile-time query support #9

bobozaur opened this issue Sep 4, 2023 · 0 comments
Assignees

Comments

@bobozaur
Copy link
Owner

bobozaur commented Sep 4, 2023

Right now the driver does not support the sqlx-cli or the compile-time query macros due to the sqlx incorporated drivers being hardcoded in the API that decides what driver to use.
This is understandable, given that a proper plugin system would be required to allow 3rd party drivers to be used in the same manner.

There are the inventory and linkme crates but each has its caveats.

  • inventory "abuses" life before main which isn't really well defined/supported in Rust and seems frail.
  • linkme seems like a better solution but the platform support seems to be more limited

Nevertheless, some change must first happen in sqlx before any 3rd party driver is able to, firstly, implement the QueryDriver API and, secondly, be seamlessly plugged in so that the compile-time query checking can actually use the driver.

@bobozaur bobozaur self-assigned this Sep 4, 2023
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

No branches or pull requests

1 participant