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

Better support for wasm based sqlite: wa-sqlite , @sqlite.org/sqlite-wasm #54

Open
lumosminima opened this issue Jan 11, 2025 · 0 comments

Comments

@lumosminima
Copy link

I'm currently using a hacky way where I set engine: sqlite and driver: pg I have a custom wa-sqlite worker where I created a new function query that matches the signature of pg's Client and handles all the param binding etc which I pass to all query functions and this mostly works apart from #53 but a better way could be to set driver to custom and export a custom Client type signature from this package that we would be responsible for implementing so to avoid installing @types/pg and better support for all future wasm-sqlite client libraries.

I'm already using sqlc in backend with go and want to use some of the same queries on frontend to provide offline functionality using opfs backed wasm sqlite. To provide offline functionality usually we end up duplicating the whole stack but with sqlc paradigm of SQL first there would be minimal duplication. After having feature parity with sqlc-gen-go I think this could become the differentiating factor for sqlc-gen-typescript since in JS world people usually opt for query builders (kysely,knex..) or ORMs (prisma,typeorm..)

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

1 participant