/** * Contract interface for database clients. * * No default first-party implementation is currently shipped. * * @module extensions/database/database-client */ /** Result returned from {@link DatabaseClient.query}. */ export interface QueryResult> { /** Array of rows returned by the query. */ rows: T[]; /** Number of rows affected by the statement. */ rowCount: number; } /** * DatabaseClient contract interface. * * Implementations provide parameterized query execution against a * relational or document database. */ export interface DatabaseClient { /** Run a read query and return the matching rows. */ query>(sql: string, params?: unknown[]): Promise>; /** Execute a write statement and return the affected row count. */ execute(sql: string, params?: unknown[]): Promise; /** Open or initialize the database connection. */ connect(): Promise; /** Close the database connection and release resources. */ disconnect(): Promise; } //# sourceMappingURL=database-client.d.ts.map