juanluispaz / ts-sql-query

Type-safe SQL query builder like QueryDSL or JOOQ in Java or Linq in .Net for TypeScript with MariaDB, MySql, Oracle, PostgreSql, Sqlite and SqlServer support.
https://ts-sql-query.readthedocs.io/
MIT License
291 stars 19 forks source link

Add QueryRunner for sqlite3 wasm implementation #107

Closed melink14 closed 7 months ago

melink14 commented 1 year ago

SQLite now officially supports a build for use in WASM-capable browsers. It has a couple different APIs but they it seems like it should be fairly simple to create a QueryRunner for them and gaining all the benefits of ts-sql-query in the browser.

Ref: https://sqlite.org/wasm/doc/trunk/index.md

Let me know if that's reasonable or if there's anything I can do to help.

juanluispaz commented 1 year ago

Good!!!

I will add support to it.

I think there will appear two different query runners:

What do you think? Am I leaving something behind?

melink14 commented 1 year ago

That seems good to me! (I don't think there would be any reason to support the C API in additon to the OO1 api afaict)

Thanks for the fast response!

juanluispaz commented 1 year ago

I'm waiting for https://github.com/tomayac/sqlite-wasm/issues/1 be fixed to add support to @sqlite.org/sqlite-wasm

juanluispaz commented 9 months ago

Released ts-sql-query 1.57.0 implementing Sqlite3WasmOO1QueryRunner

juanluispaz commented 7 months ago

Hi,

ts-sql-query 1.57.0 implemented Sqlite3WasmOO1QueryRunner. Regarding the worker promise, it sounds more interesting to put all the queries inside the worker instead of just the database.

I'm going to close this issue as completed. If you have any further feedback, let me know.

melink14 commented 7 months ago

Thanks @juanluispaz for the work here. I hope to try it out soon!