export interface SQLiteRow { [key: string]: any; } export interface SQLiteResult { rows: SQLiteRow[]; rowsAffected: number; lastInsertRowId?: number; } export interface SQLiteConnection { execute(sql: string, params?: any[]): Promise; close(): Promise; } export interface SQLiteAdapter { connect(path: string): Promise; isSupported(): Promise; name?: string; version?: string; } export interface TypeMappingConfig { type_mapping: { [targetType: string]: { [sourceType: string]: string; }; }; } export interface ColumnDefinition { name: string; type: string; precision?: number; scale?: number; option_key?: string; description?: string; nullable?: boolean; default?: any; primary_key?: boolean; auto_increment?: boolean; enum?: string[] | number[]; unique?: boolean; constraints?: string; length?: number; } export interface Column { name: string; value?: any; } export interface WhereClause { name: string; value: any; operator?: string; } export interface OrderByClause { name: string; direction?: "ASC" | "DESC"; } export interface LimitOffset { limit?: number; offset?: number; } export interface QueryTable { name: string; cols: Column[]; wheres?: WhereClause[]; orderbys?: OrderByClause[]; limitOffset?: LimitOffset; } export interface JoinClause { type: "INNER" | "LEFT" | "RIGHT" | "FULL"; table: string; on: string; } export interface IndexDefinition { name: string; columns: string[]; unique?: boolean; description?: string; } export type ForeignKeyAction = "CASCADE" | "RESTRICT" | "SET NULL" | "NO ACTION" | undefined; export interface ForeignKeyDefinition { name: string; columns: string[]; references: { table: string; columns: string[]; }; on_delete?: string | ForeignKeyAction; on_update?: string | ForeignKeyAction; description?: string; } export interface TableDefinition { name: string; cols: ColumnDefinition[]; description?: string; indexes?: IndexDefinition[]; foreign_keys?: ForeignKeyDefinition[]; } export interface DatabaseSchema { version: string; database_name: string; description?: string; type_mapping?: TypeMappingConfig["type_mapping"]; schemas: Record; } export interface TransactionOperation { type: "insert" | "update" | "delete" | "select"; table: QueryTable; } export interface ImportOptions { tableName: string; data: Record[]; batchSize?: number; onProgress?: (processed: number, total: number) => void; onError?: (error: Error, rowIndex: number, rowData: Record) => void; skipErrors?: boolean; validateData?: boolean; updateOnConflict?: boolean; conflictColumns?: string[]; includeAutoIncrementPK?: boolean; } export interface ImportResult { totalRows: number; successRows: number; errorRows: number; errors: Array<{ rowIndex: number; error: string; rowData: Record; }>; executionTime: number; } export interface ColumnMapping { sourceColumn: string; targetColumn: string; transform?: (value: any) => any; } export interface DbFactoryOptions { config?: DatabaseSchema; configAsset?: any; dbDirectory?: string; adapter?: SQLiteAdapter; } export interface ServiceStatus { schemaName: string; tableName: string; isOpened: boolean; isInitialized: boolean; hasDao: boolean; } export interface HealthCheckResult { healthy: boolean; schemaName: string; recordCount?: number; error?: string; timestamp: string; } declare global { interface Window { SQL?: any; initSqlJs?: (config?: any) => Promise; openDatabase?: (name: string, version: string, displayName: string, estimatedSize: number) => any; } var Deno: { env: any; readTextFile?: (path: string) => Promise; writeTextFile?: (path: string, data: string) => Promise; version?: { deno: string; }; [key: string]: any; } | undefined; var Bun: { version: string; [key: string]: any; } | undefined; var Windows: any; var process: any; var Platform: { OS: string; Version?: string; } | undefined; } export declare const SQLITE_TYPE_MAPPING: { sqlite: { string: string; varchar: string; char: string; text: string; email: string; url: string; uuid: string; integer: string; int: string; bigint: string; smallint: string; tinyint: string; number: string; decimal: string; numeric: string; float: string; double: string; boolean: string; bool: string; timestamp: string; datetime: string; date: string; time: string; json: string; jsonb: string; array: string; object: string; blob: string; binary: string; objectid: string; }; }; //# sourceMappingURL=types.d.ts.map