/** * PostgreSQL client implementation. * * Uses the proto-generated Plugin type from @superblocksteam/types * for type-safe request building. */ import type { z } from "zod"; import type { QueryExecutor, TraceMetadata } from "../registry.js"; import type { IntegrationConfig, IntegrationClientImpl } from "../types.js"; import type { PostgresClient } from "./types.js"; /** * Internal implementation of PostgresClient. * * This implementation communicates with the orchestrator to execute queries. * At runtime, the orchestrator injects the actual database connection and * handles authentication. */ export declare class PostgresClientImpl implements PostgresClient, IntegrationClientImpl { readonly name: string; readonly pluginId: string; readonly config: IntegrationConfig; private readonly executeQuery; constructor(config: IntegrationConfig, executeQuery: QueryExecutor); /** * Builds a PostgreSQL plugin request object. * * When params are provided, the SQL body is sent with placeholders intact * (e.g. $1, $2) and the parameter values are passed via the `parameters` * field as a JSON-stringified array. The server performs the actual * parameter binding, avoiding client-side SQL interpolation. * * @param sql - The SQL query to execute (with $1, $2 placeholders when parameterized) * @param params - Optional query parameters for server-side binding * @returns The plugin request object matching the proto schema */ private buildRequest; query(sql: string, schema: z.ZodSchema, params?: unknown[], metadata?: TraceMetadata): Promise; execute(sql: string, params?: unknown[], metadata?: TraceMetadata): Promise<{ rowCount: number; }>; } //# sourceMappingURL=client.d.ts.map