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

Async support? #19

Open
kylebarron opened this issue Mar 18, 2024 · 2 comments
Open

Async support? #19

kylebarron opened this issue Mar 18, 2024 · 2 comments

Comments

@kylebarron
Copy link

It looks like right now this crate is synchronous-only. Do you have any interest in expanding to async drivers? E.g. sqlx for postgres?

@aljazerzen
Copy link
Owner

aljazerzen commented Mar 19, 2024

Yes, this is possible to implement without a lot of trouble.

Database drivers that I'm currently using either:

  • already support async (postgres via tokio-postgres, mysql via mysql-async),
  • execute the query in the current thread anyway (SQLite and DuckDB).

So I don't think there even is a need for something heavy such as sqlx.


The biggest pain point will be a whole new API, ideally in a separate crate. I think that most of the code can be reused, since it preforms only sync work. The only thing that will need to be rewritten is implementation of the API, namely Connector, Statement, ResultRead and Append.

@aljazerzen
Copy link
Owner

This issue is not a priority for me atm, so if anyone else wants it implemented, upvote the issue.

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

2 participants