/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Typed wrapper around `@dsnp/parquetjs`'s `ParquetReader` that narrows the row-iterator generic to * a user-supplied record type and adds `AsyncDisposable` support so `await using` cleans up the * envelope reader without an explicit `close()`. */ import { ParquetReader as BaseParquetReader } from "@dsnp/parquetjs"; import type { BufferReaderOptions } from "@dsnp/parquetjs/dist/lib/bufferReader.js"; import { ParquetEnvelopeReader } from "@dsnp/parquetjs/dist/lib/reader.js"; import type { ParquetSchema, ParquetRecordLike } from "./schema.ts"; /** * A typed Parquet reader, wrapping the base Parquet reader. */ export declare class ParquetReader extends BaseParquetReader implements AsyncDisposable { schema: ParquetSchema; static openFile(filePath: string | URL, options?: BufferReaderOptions): Promise>; static openBuffer(buffer: Buffer, options?: BufferReaderOptions): Promise>; static openEnvelopeReader(envelopeReader: ParquetEnvelopeReader, opts?: BufferReaderOptions): Promise>; [Symbol.asyncIterator](): AsyncGenerator; /** * Iterate a subset of the columns, narrowed to the keys asked for. * * Parquet is columnar, so a projection is read avoided rather than read-then-discarded: on a 14-column corpus shard, * two columns cost 93 ms against 253 ms for the whole row. The default iterator reads every column, which is what a * caller wanting the whole record should use. */ project(...columns: K[]): AsyncGenerator, void, unknown>; [Symbol.asyncDispose](): Promise; dispose(): Promise; } //# sourceMappingURL=reader.d.ts.map