Ducklings API Documentation
    Preparing search index...

    A chunk of data from a streaming query result.

    DataChunks contain a fixed number of rows and provide methods to access the data in various formats.

    for await (const chunk of stream) {
    console.log(`Chunk has ${chunk.rowCount} rows`);

    // Get as array of objects
    for (const row of chunk.toArray()) {
    console.log(row);
    }

    // Or access raw columnar data
    const column = chunk.getColumn(0);
    console.log(column);
    }
    Index

    Constructors

    Accessors

    Methods

    • Get a single row as an object.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • index: number

        The 0-based row index

      Returns T

      The row as an object with column names as keys