HFQR / xitca-web

An HTTP library and web framework for safe Rust
https://docs.rs/xitca-web/latest/xitca_web/
Apache License 2.0
756 stars 44 forks source link

xitca-postgres & diesel-async #621

Closed godofdream closed 1 month ago

godofdream commented 1 year ago

I like the postgres implementation. Would It make sense to re-use the diesel query-builder like diesel-async does?

fakeshadow commented 1 year ago

Thanks for making an issue. Indeed it would be better to have a high level ORM on top of xitca-postgres. It should be possible to plug in diesel-async(or something like it) api to xitca-postgres as latter is more or less a tokio-posgres fork with almost identical api. That said the driver is still a work in progress and lacking some important features like transactions/portal/cancel query etc. So right now an ORM implementation could be left with some major blank impls with no actual functionality. I personally would expect no progress on ORM until the driver is at least feature comparable to tokio-postgres(which is actively being worked on)

godofdream commented 1 year ago

Ok, I'm looking forward to the feature compatible xitca-postgres. As long as the api is mostly identical diesel-async could get a feature switch to use xitca-postgres. Do you want to keep this Issue as reminder?

fakeshadow commented 1 year ago

Do you want to keep this Issue as reminder?

Yes let's keep it open.

fakeshadow commented 1 month ago

xitca-postgres has almost achieve feature parity with tokio-postgres lately and I have started looking into integration with diesel-async.

Initial work can be found here where tokio-postgres is replaced with xitca-postgres as underlying pg client. When this fork is properly tested and optimized I'll look into making it a standalone crate as an extension of diesel-async

Future development will happen in xitca-postgres-diesel. If you have further issue with this topic consider opening another one there

fakeshadow commented 1 month ago

Close in favor of repo mentioned in last comment