@qualithm/arrow-flight-sql-js - v0.4.3
    Preparing search index...

    Class QueryResult

    Result of a query execution with methods to stream or collect data.

    const result = await client.query("SELECT * FROM users")

    // Option 1: Stream record batches (memory efficient)
    for await (const batch of result.stream()) {
    console.log(`Batch with ${batch.numRows} rows`)
    }

    // Option 2: Collect all data into a table
    const table = await result.collect()
    console.log(`Total rows: ${table.numRows}`)
    Index

    Constructors

    Accessors

    • get schema(): Schema<any> | null

      Get the Arrow schema for this query result May be null if schema could not be parsed

      Returns Schema<any> | null

    • get totalRecords(): bigint

      Get the total number of records (if known) Returns -1 if unknown

      Returns bigint

    Methods

    • Collect all data from all endpoints into a single Table. Warning: This loads the entire result set into memory.

      Returns Promise<Table<any>>

    • Stream record batches from all endpoints. This is memory-efficient for large result sets.

      Flight SQL streams data as:

      1. Schema message (dataHeader only)
      2. RecordBatch messages (dataHeader + dataBody)

      We collect all messages and parse them as a complete IPC stream.

      Returns AsyncGenerator<RecordBatch<any>, void, unknown>