Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Consider migrating DB interface to something async compatible #248

Open
tjtelan opened this issue May 27, 2020 · 0 comments
Open

Consider migrating DB interface to something async compatible #248

tjtelan opened this issue May 27, 2020 · 0 comments

Comments

@tjtelan
Copy link
Member

tjtelan commented May 27, 2020

As I'm completing the rest of the interfaces for #243, I am feeling like I'm fighting the compiler a lot because Diesel's connector cannot be sent across async threads safely. It is frustrating but I wanted to open this issue so I can revisit the pros/cons later.

I'm using Diesel because I want compile-time checked queries, but also because it will manage sql migrations. Another feature is mapping custom Postgres enums to my own structs.

I see is sqlx. But it doesn't handle migrations and I'm unsure how it maps queries to my structs. Especially w/ my custom PG types.

I may be able to keep Diesel and use the tokio-diesel crate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant