UNPKG

flint-orm

Version:

Type-safe SQLite ORM for JavaScript

20 lines (19 loc) 663 B
import type { Database } from 'bun:sqlite'; import type { SchemaState } from '../migration/types'; /** * Read the live database schema and return a SchemaState. * * This reads tables, columns, indexes, and foreign key references from * the SQLite database using PRAGMAs. * * @param client - The bun:sqlite Database instance * @returns SchemaState representing the live database schema * * @example * import { Database } from "bun:sqlite"; * import { introspect } from "flint-orm/sqlite/introspect"; * * const client = new Database("app.db"); * const state = introspect(client); */ export declare function introspect(client: Database): SchemaState;