/** * PostgreSQL JSONB Tools - Read Operations * * Read-only JSONB tools: extract, contains, pathQuery. * Also exports shared utilities: toJsonString, resolveJsonbTable, parseSelectAlias. */ import type { PostgresAdapter } from "../../postgres-adapter.js"; import type { ToolDefinition } from "../../../../types/index.js"; /** * Convert value to a valid JSON string for PostgreSQL's ::jsonb cast * If the value is a string that looks like a JSON object or array, it is parsed and * validated to support raw JSON literals, throwing a ValidationError if malformed. */ export declare function toJsonString(value: unknown): string; /** * Resolve table and schema for JSONB tools. * Validates schema existence when non-public, returns schema-qualified table name. * Returns [qualifiedTable, null] on success, or [null, errorResponse] on failure. */ export declare function resolveJsonbTable(adapter: PostgresAdapter, table: string, schema?: string): Promise<[string, null] | [null, { success: false; error: string; }]>; export declare function createJsonbExtractTool(adapter: PostgresAdapter): ToolDefinition; export declare function createJsonbContainsTool(adapter: PostgresAdapter): ToolDefinition; export declare function createJsonbPathQueryTool(adapter: PostgresAdapter): ToolDefinition; /** * Parse a select expression and extract the alias if present. * Handles: "column", "expression AS alias", "expression as alias" * Returns: { expr: string, alias: string } */ export declare function parseSelectAlias(selectItem: string): { expr: string; alias: string; }; //# sourceMappingURL=read.d.ts.map