import { TDbContextOption } from "./DbContext"; import { ISOLATION_LEVEL } from "./IDbConn"; import { IQueryColumnDef, TQueryDef } from "./query/query-builder/types"; export interface IDbContextExecutor { getInfoAsync(): Promise<{ dialect: TDbContextOption["dialect"]; database?: string; schema?: string; }>; connectAsync(): Promise; beginTransactionAsync(isolationLevel?: ISOLATION_LEVEL): Promise; commitTransactionAsync(): Promise; rollbackTransactionAsync(): Promise; executeDefsAsync(defs: TQueryDef[], options?: (IQueryResultParseOption | undefined)[]): Promise; executeParametrizedAsync(query: string, params?: any[]): Promise; bulkInsertAsync(tableName: string, columnDefs: IQueryColumnDef[], records: Record[]): Promise; bulkUpsertAsync(tableName: string, columnDefs: IQueryColumnDef[], records: Record[]): Promise; closeAsync(): Promise; } export interface IQueryResultParseOption { columns?: Record; joins?: Record; }