feat: Prefer count header, procedures outside exposed schemas; 0.2.0

This commit is contained in:
2026-11-02 01:50:34 +01:00
parent 31f97fd392
commit 8735abfe79
18 changed files with 73 additions and 38 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import { logical } from './types.js';
type Row = Record<string, unknown>;
/** Reads tables and views of the main database or of attached ones; SQLite's schemas are its attached databases. */
export function introspect(db: Database, scope: { schemas: string[]; tables: string[] }): Catalog {
export function introspect(db: Database, scope: { schemas: string[]; tables: string[]; functions: string[] }): Catalog {
const schemas = new Set([...scope.schemas, ...scope.tables.map((t) => t.split('.')[0])]);
const attached = new Set((db.prepare('PRAGMA database_list').all() as Row[]).map((r) => r.name as string));
const tables: CatalogTable[] = [];