Skip to content

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

Open
@lumosminima

Description

@lumosminima

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..)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions