import { Readable, Writable } from 'stream'; export { Readable, Writable } from 'stream'; interface CLOB { type: 'CLOB'; value: string; } interface BLOB { type: 'BLOB'; value: string; } type Param = string | number | Date | null | CLOB | BLOB; interface QueryOptions { trim: boolean; } interface Metadata { name: string; typeName: string; precision: number; scale: number; } interface Statement { isQuery: () => boolean; metadata: () => Promise; asArray: () => Promise; asIterable: () => AsyncIterable; asStream: (options?: any) => Readable; asObjectStream: (options?: any) => Promise; updated: () => Promise; close: Close; } type Execute = (sql: string, params?: Param[]) => Promise; type Query = (sql: string, params?: Param[], options?: QueryOptions) => Promise; type Update = (sql: string, params?: Param[]) => Promise; type CreateReadStream = (sql: string, params?: Param[]) => Readable; type InsertAndGetId = (sql: string, params?: Param[]) => Promise; interface WriteStreamOptions { bufferSize: number; } type CreateWriteStream = (sql: string, options?: WriteStreamOptions) => Writable; type BatchUpdate = (sql: string, params?: Param[][]) => Promise; type Close = () => void; type InsertList = (tableName: string, idColumn: string, rows: any[]) => Promise; interface BaseConnection { query: Query; update: Update; isInMemory: () => boolean; createReadStream: CreateReadStream; insertAndGetId: InsertAndGetId; insertList: InsertList; createWriteStream: CreateWriteStream; batchUpdate: BatchUpdate; execute: Execute; } export type { BLOB, BaseConnection, BatchUpdate, CLOB, Close, CreateReadStream, CreateWriteStream, Execute, InsertAndGetId, InsertList, Metadata, Param, Query, QueryOptions, Statement, Update, WriteStreamOptions };