License
BSD-3-Clause
The lazy IO scan sources of ddn.df (ADR-2026-10-29-03, amended 2026-10-29 for the input modes): scanCsv reads CSV incrementally without loading a complete frame first. Two input modes: memory- mapped files (the fast path over seekable sources) and a buffered streaming mode (any source - pipes, stdin, sockets) that retains only the incomplete trailing record. Both modes parse serially with the eager reader's exact field handling, so errors surface in file order at the first failing batch.
The CSV scan's input mode (the author's 2026-10-29 amendment: non-seekable sources stay first-class).
private MmFile mmprivate CsvBatchParser parserprivate string pathprivate bool closedprivate bool startedprivate typeof(byRows(cast(const(char)[]) null,
CsvReadPolicy.init.dialect))rows rowsScanSource acquire() @safeColumnSchema[] schema() @safebool supportsProjection() @safeScanSource project(scope string[] columns) @safevoid close() @trustedthis(string path, Schema schema, CsvReadPolicy policy,
string[] projected = null)private File inputprivate CsvBatchParser parserprivate string labelprivate string reopenPathprivate bool closedprivate bool startedprivate bool eofprivate char[] bufferprivate bool acquired_ScanSource acquire() @safeColumnSchema[] schema() @safebool supportsProjection() @safeScanSource project(scope string[] columns) @safevoid close() @trustedthis(File input, Schema schema, CsvReadPolicy policy, string label,
string reopenPath = null, string[] projected = null)LazyFrame scanCsv(string path, Schema schema,
CsvReadPolicy policy = CsvReadPolicy.init,
CsvScanMode mode = CsvScanMode.AUTO) @trustedOpens a CSV file as a lazy scan source: the returned deferred frame pulls one batch per `policy.chunkRows` rows when collected or streamed, without loading the file first. The schema is explicit (i...LazyFrame scanCsv(File input, Schema schema,
CsvReadPolicy policy = CsvReadPolicy.init) @trustedDitto, from an already-open handle (a pipe, stdin, a socket stream - the buffered mode by construction; the source owns the handle until close()).ScanSource openCsvScan(string path, Schema schema,
CsvReadPolicy policy, CsvScanMode mode) @trusted