/** * PostgreSQL pgvector - Data Operations * * Write tools: extension, addColumn. * Also exports shared utilities: parseVector, truncateVector, checkTableAndColumn. */ import type { PostgresAdapter } from "../../postgres-adapter.js"; import type { ToolDefinition } from "../../../../types/index.js"; /** * Parse a PostgreSQL vector string to a number array. * Handles formats like "[0.1,0.2,0.3]" or "(0.1,0.2,0.3)" */ export declare function parseVector(vecStr: unknown): number[] | null; /** * Truncate a vector for display, showing first/last N values. * For vectors <= maxDisplay, returns the full vector. */ export declare function truncateVector(vec: number[] | null | undefined, maxDisplay?: number): { preview: number[] | null; dimensions: number; truncated: boolean; }; /** * Two-step existence check: table first, then column. * Returns null if both exist, or {error, suggestion} if either is missing. */ export declare function checkTableAndColumn(adapter: PostgresAdapter, table: string, column: string, schema: string, transactionId?: string): Promise<{ error: string; code: string; category: string; suggestion: string; } | null>; export declare function createVectorExtensionTool(adapter: PostgresAdapter): ToolDefinition; export declare function createVectorAddColumnTool(adapter: PostgresAdapter): ToolDefinition; //# sourceMappingURL=data.d.ts.map