mirror of
https://github.com/kunkunsh/kunkun-ext-sqlite-browser.git
synced 2025-04-03 18:56:44 +00:00
19 lines
544 B
TypeScript
19 lines
544 B
TypeScript
import { SQLiteBrowser } from './dao.ts';
|
|
|
|
const browser = new SQLiteBrowser();
|
|
browser.init('kk.dev.db');
|
|
|
|
// Get all tables
|
|
const tables = browser.getTables();
|
|
console.log('Tables in database:', tables);
|
|
|
|
// Get extensions table columns
|
|
const extensionColumns = browser.getTableColumns('extensions');
|
|
console.log('Extension columns:', extensionColumns);
|
|
|
|
// Get extensions data with pagination
|
|
const extensionsData = browser.getTableData('extensions', { page: 1, pageSize: 10 });
|
|
console.log('Extensions:', extensionsData);
|
|
|
|
browser.close();
|