Class OINODbDataSetAbstract

Base class for SQL results that can be asynchronously iterated (but not necessarity rewinded). Idea is to handle database specific mechanisms for returning and formatting conventions in the database specific implementation. Data might be in memory or streamed in chunks and OINODbDataSet will serve it out consistently.

Hierarchy (view full)

Constructors

  • Constructor for OINODbDataSet.

    Parameters

    • data: unknown

      internal database specific data type (constructor will throw if invalid)

    • messages: string[] = []

      error messages from SQL-query

    Returns OINODbDataSet

Properties

messages: string[]

Error messages

Methods

  • Gets all rows of data.

    NOTE: This is left abstract instead of just using getRow() so that DB implementations can hopefully optimize not duplicating data *

    Returns Promise<OINODataRow[]>

  • Checks if the messages contain errors.

    Returns string

  • Checks if the messages contain errors.

    Returns boolean

  • Is there no more content, i.e. either dataset is empty or we have moved beyond last line

    Returns boolean

  • Attempts to moves dataset to the next row, possibly waiting for more data to become available. Returns !isEof().

    Returns Promise<boolean>