Skip to content

Compile-time query support #9

@bobozaur

Description

@bobozaur

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions