import { type DatabaseClient } from "../../../../core/databaseClient.js"; declare const SQLITE_AFFINITY: readonly ["null", "integer", "real", "text", "blob"]; export type SQLiteAffinity = (typeof SQLITE_AFFINITY)[number]; export declare function mapCommonTypesToAffinity(type: string, isNullable: boolean): SQLiteAffinity; declare const COLUMN_CONSTRAINTS: { readonly PRIMARY_KEY: "p"; readonly FOREIGN_KEY: "f"; readonly UNIQUE: "u"; }; type ColumnConstraintType = (typeof COLUMN_CONSTRAINTS)[keyof typeof COLUMN_CONSTRAINTS]; export interface SelectColumnsResult { affinity: SQLiteAffinity; constraints: Array; default: null | string; id: string; name: string; nullable: boolean; table: string; type: string; } interface SelectTablesResult { name: string; ncol: number; schema: string; strict: 0 | 1; type: "shadow" | "table" | "view" | "virtual"; wr: 0 | 1; } export interface FetchTableAndColumnsResult { columns: Array; id: SelectTablesResult["name"]; name: SelectTablesResult["name"]; strict: 0 | 1; type: "table"; wr: 0 | 1; } export interface FetchTableAndColumnsResultRaw { colCid: number; colDefaultValue: null | string; colName: string; colNotNull: 0 | 1; colPk: 0 | 1; colType: string; tableId: string; tableName: string; tableStrict: 0 | 1; tableType: "table"; tableWr: 0 | 1; } export declare const FETCH_TABLE_COLUMNS_LIST = "\n SELECT\n alltables.name as tableId,\n alltables.name as tableName,\n alltables.type as tableType,\n tl.wr as tableWr,\n tl.strict as tableStrict,\n ti.cid\t as colCid,\n ti.name\t as colName,\n ti.type\t as colType,\n ti.\"notnull\" as colNotNull,\n ti.dflt_value as colDefaultValue,\n ti.pk as colPk\n FROM\n sqlite_master AS alltables,\n pragma_table_list(alltables.name) AS tl,\n pragma_table_info(tl.name) AS ti\n WHERE\n alltables.type = 'table' AND alltables.name NOT LIKE 'sqlite_%'\n ORDER BY\n alltables.name, ti.cid\n"; export declare function fetchTablesAndColumns(client: DatabaseClient): Promise>; export {};