feat: Prefer count header, procedures outside exposed schemas; 0.2.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@crudy/restloom-sqlite",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"type": "module",
|
||||
"description": "SQLite dialect for restloom",
|
||||
"keywords": [
|
||||
@@ -36,7 +36,7 @@
|
||||
"prepack": "npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@crudy/restloom": "^0.1.0"
|
||||
"@crudy/restloom": "^0.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"better-sqlite3": ">=12"
|
||||
|
||||
@@ -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[] = [];
|
||||
|
||||
Reference in New Issue
Block a user