import { DuckDBType } from '../../@duckdb/data-types'; import { DuckDBValue } from '../../@duckdb/data-values'; import { AsyncDuckDBDataBatchIterator } from './AsyncDuckDBDataBatchIterator.js'; import { DuckDBData } from './DuckDBData.js'; /** * A result set that can be read incrementally. * * Represents either a partial or full result. * For full results, the `done` property will be true. * To read more rows into a partial result, use the `readUntil` or `readAll` methods. */ export declare class DuckDBDataReader extends DuckDBData { private readonly iterator; private iteratorDone; private totalRowsRead; private readonly batches; private readonly batchSizeRuns; constructor(iterator: AsyncDuckDBDataBatchIterator); /** * Number of columns. * * Will be zero until the first part of the result is read. Will not change after the initial read. */ get columnCount(): number; /** * Current number of rows. * * For a partial result set, with `done` false, this may change as more rows are read. * For a full result, with `done` true, this will not change. */ get rowCount(): number; /** * Returns the name of column at the given index (starting at zero). * * Note that duplicate column names are possible. * * Will return an error if no part of the result has been read yet. */ columnName(columnIndex: number): string; /** * Returns the type of the column at the given index (starting at zero). * * Will return an error if no part of the result has been read yet. */ columnType(columnIndex: number): DuckDBType; /** * Returns the value for the given column and row. Both are zero-indexed. * * Will return an error if `rowIndex` is not less than the current `rowCount`. */ value(columnIndex: number, rowIndex: number): DuckDBValue; /** * Returns true if all rows have been read. */ get done(): boolean; /** * Read all rows. */ readAll(): Promise; /** * Read rows until at least the given target row count has been met. * * Note that the resulting row count could be greater than the target, since rows are read in batches, typically of 2048 rows each. */ readUntil(targetRowCount: number): Promise; private read; private updateBatchSizeRuns; }