Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Result

A class representing a fully buffered set of results returned from QLDB.

Hierarchy

  • Result

Index

Constructors

Private constructor

  • new Result(resultList: Value[]): Result
  • Creates a Result.

    Parameters

    • resultList: Value[]

      A list of Ion values containing the statement execution's result returned from QLDB.

    Returns Result

Properties

Private _resultList

_resultList: Value[]

Methods

getResultList

  • getResultList(): Value[]
  • Returns the list of results of the statement execution returned from QLDB.

    Returns Value[]

    A list of Ion values which wrap the Ion values returned from the QLDB statement execution.

Static Private _fetchResultPages

  • _fetchResultPages(txnId: string, page: Page, communicator: Communicator): Promise<Value[]>
  • Fetches all subsequent Pages given an initial Page, places each value of each Page in an Ion value.

    Parameters

    • txnId: string

      The ID of the transaction the statement was executed in.

    • page: Page

      The initial page returned from the statement execution.

    • communicator: Communicator

      The Communicator used for the statement execution.

    Returns Promise<Value[]>

    Promise which fulfills with a list of Ion values, representing all the returned values of the result set.

Static _handleBlob

  • _handleBlob(ionBinary: IonBinary): Buffer | Uint8Array | string
  • Handle the unexpected Blob return type from QLDB.

    throws

    ClientException when the specific type of the IonBinary value is Blob.

    Parameters

    • ionBinary: IonBinary

    Returns Buffer | Uint8Array | string

    The IonBinary value cast explicitly to one of the types that make up the IonBinary type. This will be either Buffer, Uint8Array, or string.

Static Private _readResultStream

  • _readResultStream(resultStream: ResultStream): Promise<Value[]>
  • Helper method that reads a ResultStream and extracts the results, placing them in an array of Ion values.

    Parameters

    Returns Promise<Value[]>

    Promise which fulfills with a list of Ion values, representing all the returned values of the result set.

Static bufferResultStream

  • Static method that creates a Result object by reading and buffering the contents of a ResultStream.

    Parameters

    • resultStream: ResultStream

      A ResultStream object to convert to a Result object.

    Returns Promise<Result>

    Promise which fulfills with a Result.

Static create

  • Static factory method that creates a Result object, containing the results of a statement execution from QLDB.

    Parameters

    • txnId: string

      The ID of the transaction the statement was executed in.

    • page: Page

      The initial page returned from the statement execution.

    • communicator: Communicator

      The Communicator used for the statement execution.

    Returns Promise<Result>

    Promise which fulfills with a Result.

Generated using TypeDoc