sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

rqlite support

Open HaHa421 opened this issue 1 year ago • 2 comments

I just published sqlx-rqlite at https://github.com/HaHa421/sqlx-rqlite and on crates.io to enable rqlite(rqlite.io) in sqlx. Basic functionnalities are working, you can check simple and simple_chrono examples. It would be nice to see rqlite as a Tier2 (and then Tier1! ) sqlx database.

HaHa421 avatar Mar 13 '24 11:03 HaHa421

I don't want to merge a driver for every single database anyone can think of, because it'll just add to the maintenance burden. There needs to be a critical mass of people who actually want to use it and are going to be willing to help out with maintenance so it doesn't all fall on myself. If you're still using and updating sqlx-rqlite in six months to a year, then we'll talk.

However, I had some thoughts on how to improve integration for third-party drivers so they don't have to be merged into this repository to be usable. The Any driver has already been refactored to allow third-party drivers, so the only remaining component that's really needed is integration with the macros.

I think it'd be feasible to have macro support in third-party drivers available by cargo installing a binary from them, which the macros could then invoke. We kinda discussed a similar mechanism in #1598 but I think this would be much more straightforward to implement.

abonander avatar Mar 17 '24 22:03 abonander

I can understand your point of view.

I'm implementing distributed sqlite in rust right now , and the sqlx driver will be very close to the rqlite one .

I still can't tell if I 'll be using it in six months(I won't be using rqlite anyway), because I bear in mind that I'll migrate to tidb when the database grow (will need a sharded database , while my implementation is single sharded - I assume rqlite is single sharded too , but didn't look the details-)

I'm using sqlx for both for the driver and node implementation (I'm using raft behind the scene) and it performs great !

Le dim. 17 mars 2024 à 23:21, Austin Bonander @.***> a écrit :

I don't want to merge a driver for every single database anyone can think of, because it'll just add to the maintenance burden. There needs to be a critical mass of people who actually want to use it and are going to be willing to help out with maintenance so it doesn't all fall on myself. If you're still using and updating sqlx-rqlite in six months to a year, then we'll talk.

However, I had some thoughts on how to improve integration for third-party drivers so they don't have to be merged into this repository to be usable. The Any driver has already been refactored to allow third-party drivers, so the only remaining component that's really needed is integration with the macros.

I think it'd be feasible to have macro support in third-party drivers available by cargo installing a binary from them, which the macros could then invoke. We kinda discussed a similar mechanism in #1598 https://github.com/launchbadge/sqlx/issues/1598 but I think this would be much more straightforward to implement.

— Reply to this email directly, view it on GitHub https://github.com/launchbadge/sqlx/issues/3115#issuecomment-2002636940, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBH4RJEGJY54QD3WE3LCV7LYYYJNRAVCNFSM6AAAAABET7W6XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGYZTMOJUGA . You are receiving this because you authored the thread.Message ID: @.***>

HaHa421 avatar Mar 18 '24 09:03 HaHa421