Demo

SQLite database

static getInstance(): Promise<SQLiteDBConnection> manages core SQLite on mobile and creates the internal plugins registry table.

SQLite database

static getInstance(): Promise<SQLiteDBConnection> manages core SQLite on mobile and creates the internal plugins registry table.

  • Factory: Database.getInstance() / package export name in your installed version
  • Prefer this over ad-hoc Capacitor SQLite wiring in plugins
TSXSQLite — getInstance
1import { Database } from "@quan-erp/shared-frontend-core"; 2 3export async function queryLocalCache(sql: string, params: unknown[] = []) { 4 const db = await Database.getInstance(); 5 // Exact execute / query API follows SQLiteDBConnection from the package. 6 // Example pattern: 7 // const result = await db.query(sql, params); 8 // return result.values ?? []; 9 return db; 10} 11 12// Prefer shared-frontend-core Database over wiring @capacitor-community/sqlite yourself.