dyedgreen / deno-sqlite

Deno SQLite module
https://deno.land/x/sqlite
MIT License
409 stars 36 forks source link

Plans for async support? #153

Closed NfNitLoop closed 3 years ago

NfNitLoop commented 3 years ago

At first glance of the APIs, it seems like all of the database calls are synchronous. Do you have any plans to support async APIs so that servers don't block on I/O?

(Is that even possible w/ wasm?)

Either way, this project is very cool. Thanks for making it available!

dyedgreen commented 3 years ago

The sync api is likely more performant than an async API would be; if you really need to guarantee queries do not block/ have long running queries, you can move query processing to a web worker.

Also see #150

NfNitLoop commented 3 years ago

Derp. That's me. I have the memory of a goldfish apparently.

I thought I might've asked the question, and even searched the issue tracker for it, but didn't see it. Sorry for the duplicate!

I just got around to actually using the this library yesterday and ran into the async issue again. Other than that, it was a pleasure to use. Thanks again!

dyedgreen commented 3 years ago

No worries 😉 Glad you find the library useful!