Closed bluepuma77 closed 6 months ago
It seems this is a way to use sqlite
from CapacitorJS (source):
import { CapacitorSQLite, SQLiteConnection } from "@capacitor-community/sqlite";
const sqlite = new SQLiteConnection(CapacitorSQLite);
let db
try {
db = await sqlite.retrieveConnection("db1", false);
} catch (err) {
db = await sqlite.createConnection("db1", false, "no-encryption", 1, false);
}
console.log('db', db)
But how would I connect this to WatermelonDB?
There's no SvelteKit/CapacitorJS adapter for WatermelonDB. Here's the guide for how to create new db adapters: https://watermelondb.dev/docs/Implementation/DatabaseAdapters
I admit it, it's a really complicated setup with Svelte (issue) and CapacitorJS. (template 1, template 2)
Any idea why I am receiving this error?
Source: