Demo

SQLite database

static getInstance(): Promise<SQLiteDBConnection> သည် mobile တွင် core SQLite ကို စီမံပြီး အတွင်းပိုင်း plugins registry ဇယားကို ဖန်တီးပေးပါသည်။

SQLite database

static getInstance(): Promise<SQLiteDBConnection> သည် mobile တွင် core SQLite ကို စီမံပြီး အတွင်းပိုင်း plugins registry ဇယားကို ဖန်တီးပေးပါသည်။

  • Factory: Database.getInstance() / သင့် installed version ရှိ package export အမည်
  • Plugin ထဲတွင် Capacitor SQLite ကို ကိုယ်တိုင် မချိတ်ဆက်ဘဲ ဤ API ကို ဦးစားပေးပါ
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.