import { NativeAdbcConnection, NativeAdbcStatement } from '../binding.js'; import type { AdbcDatabase as AdbcDatabaseInterface, AdbcConnection as AdbcConnectionInterface, AdbcStatement as AdbcStatementInterface, ConnectOptions, GetObjectsOptions, IngestOptions } from './types.js'; import { LoadFlags, ObjectDepth, InfoCode, IngestMode } from './types.js'; import { RecordBatchReader, Table, Schema } from 'apache-arrow'; import { AdbcError } from './error.js'; declare const asyncDisposeSymbol: any; export type { ConnectOptions, GetObjectsOptions, IngestOptions }; export { AdbcError, LoadFlags, ObjectDepth, InfoCode, IngestMode }; /** * Represents an ADBC Database. */ export declare class AdbcDatabase implements AdbcDatabaseInterface { [asyncDisposeSymbol]: () => Promise; private _inner; constructor(options: ConnectOptions); connect(): Promise; close(): Promise; } /** * Represents a single connection to a database. */ export declare class AdbcConnection implements AdbcConnectionInterface { [asyncDisposeSymbol]: () => Promise; private _inner; /** @internal */ constructor(inner: NativeAdbcConnection); createStatement(): Promise; setOption(key: string, value: string): void; setAutoCommit(enabled: boolean): void; setReadOnly(enabled: boolean): void; getObjects(options?: GetObjectsOptions): Promise; getTableSchema(options: { catalog?: string; dbSchema?: string; tableName: string; }): Promise; getTableTypes(): Promise
; getInfo(infoCodes?: InfoCode[]): Promise
; query(sql: string, params?: Table): Promise
; queryStream(sql: string, params?: Table): Promise; private setIngestOptions; ingest(tableName: string, data: Table, options?: IngestOptions): Promise; ingestStream(tableName: string, reader: RecordBatchReader, options?: IngestOptions): Promise; execute(sql: string, params?: Table): Promise; commit(): Promise; rollback(): Promise; close(): Promise; } /** * Represents a query statement. */ export declare class AdbcStatement implements AdbcStatementInterface { [asyncDisposeSymbol]: () => Promise; private _inner; /** @internal */ constructor(inner: NativeAdbcStatement); setSqlQuery(query: string): Promise; setOption(key: string, value: string): void; /** * Execute the query and return a RecordBatchReader. * * Per the ADBC spec, behavior is undefined if the statement is reused after * calling executeQuery(). Create a new statement for each query. */ executeQuery(): Promise; executeUpdate(): Promise; bind(data: Table): Promise; bindStream(reader: RecordBatchReader): Promise; close(): Promise; }