/** * Dynamic Table Database Operations * * Provides database operations for runtime-created tables that allow the LLM * to store and retrieve custom data structures persistently. */ import type { DynamicTable, DynamicRow, DynamicQueryResult, DynamicQueryOptions, DynamicColumnSchema } from '../types/dynamic.js'; /** * Initialize the dynamic tables schema. * Creates the metadata tables if they don't exist. */ export declare function initDynamicSchema(): void; /** * Pre-built table schemas for common analysis workflows. */ declare const PREBUILT_TABLES: Array<{ name: string; description: string; schema: DynamicColumnSchema[]; }>; /** * Create a new dynamic table. */ export declare function createDynamicTable(name: string, schema: DynamicColumnSchema[], description: string, createdBy?: string): { success: boolean; error?: string; }; /** * Get metadata for a dynamic table. */ export declare function getTableMetadata(name: string): DynamicTable | null; /** * List all dynamic tables. */ export declare function listDynamicTables(): DynamicTable[]; /** * Drop a dynamic table and all its data. */ export declare function dropDynamicTable(name: string): { success: boolean; error?: string; rows_deleted?: number; }; /** * Insert a row into a dynamic table. */ export declare function insertDynamicRow(tableName: string, data: Record, rowId?: string): { success: boolean; row_id?: string; error?: string; }; /** * Insert multiple rows into a dynamic table. */ export declare function insertDynamicRows(tableName: string, rows: Array<{ data: Record; row_id?: string; }>): { success: boolean; inserted: number; errors: string[]; }; /** * Query rows from a dynamic table. */ export declare function queryDynamicTable(tableName: string, options?: DynamicQueryOptions): DynamicQueryResult | { error: string; }; /** * Delete rows from a dynamic table. */ export declare function deleteDynamicRows(tableName: string, rowIds: string[]): { success: boolean; deleted: number; error?: string; }; /** * Get a single row by ID. */ export declare function getDynamicRow(tableName: string, rowId: string): DynamicRow | { error: string; }; export { PREBUILT_TABLES, };