Using Drizzle with Capacitor?

Is there a way to use Drizzle with capacitor-sqlite, or just a generic SQLite driver?
9 Replies
ThatXliner
ThatXlinerOP•10mo ago
bump? or should I be puttting this into a github issue?
Angelelz
Angelelz•10mo ago
There is no official support just yet. You might want to check of the issue doesn't exist before opening one
ThatXliner
ThatXlinerOP•10mo ago
what about a generic SQLite driver?
Angelelz
Angelelz•10mo ago
I guess you could wrap capacitor driver with your own class that implement all the methods drizzle is expecting You could pass it directly with as any just to see what happens
ThatXliner
ThatXlinerOP•10mo ago
"implement all the methods drizzle" that's not documented, and im pretty sure it depends on what driver i imported but i can try
Angelelz
Angelelz•10mo ago
Yeah, this is not for a beginner. It's not documented because a user is not supposed to need this type of interface. But if you need to use this driver, this is a way you could make it work
bluepuma
bluepuma•9mo ago
There is an issue for that 😊 https://github.com/drizzle-team/drizzle-orm/issues/924
GitHub
[FEATURE]: Support CapacitorJS SQLite · Issue #924 · drizzle-team/...
Describe what you want https://github.com/capacitor-community/sqlite it's a Capacitor community plugin for Native and Electron SQLite Databases. It would be nice to support it. Thanks for takin...
bluepuma
bluepuma•9mo ago
There is also an issue on the CapacitorJS SQLite module https://github.com/capacitor-community/sqlite/issues/395
GitHub
drizzle-orm maybe future?) · Issue #395 · capacitor-community/sql...
hi @jepiqueau there seems to be a normal orm for the frontend based on zod: https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/README.md What do you think about it?)
bluepuma
bluepuma•9mo ago
It would be interesting to get the developer of the SQLite module to talk to a drizzle developer, they would shure find a quick way to solve this missing piece
Want results from more Discord servers?
Add your server