Options
All
  • Public
  • Public/Protected
  • All
Menu

A class representing the result of a statement returned from QLDB as a stream. Extends Readable from the Node.JS Stream API interface. The stream will always operate in object mode.

Hierarchy

  • Readable
    • ResultStream

Implements

  • ReadableStream

Index

Constructors

constructor

  • Create a ResultStream.

    Parameters

    • txnId: string

      The ID of the transaction the statement was executed in.

    • firstPage: Page

      The initial page returned from the statement execution.

    • communicator: Communicator

      The Communicator used for the statement execution.

    Returns ResultStream

Properties

Private _cachedPage

_cachedPage: Page

Private _communicator

_communicator: Communicator

Private _isPushingData

_isPushingData: boolean

Private _retrieveIndex

_retrieveIndex: number

Private _shouldPushCachedPage

_shouldPushCachedPage: boolean

Private _txnId

_txnId: string

readable

readable: boolean

readableHighWaterMark

readableHighWaterMark: number

readableLength

readableLength: number

Static defaultMaxListeners

defaultMaxListeners: number

Methods

[Symbol.asyncIterator]

  • [Symbol.asyncIterator](): AsyncIterableIterator<any>
  • Returns AsyncIterableIterator<any>

_destroy

  • _destroy(error: Error | null, callback: function): void
  • Parameters

    • error: Error | null
    • callback: function
        • (error?: Error | null): void
        • Parameters

          • Optional error: Error | null

          Returns void

    Returns void

Private _pushPageValues

  • _pushPageValues(): Promise<void>
  • Pushes the values for the Node Streams Readable Interface. This method fetches the next page if is required and handles converting the values returned from QLDB into an Ion value.

    Returns Promise<void>

    Promise which fulfills with void.

_read

  • _read(size?: number): void
  • Implementation of the readable.read method for the Node Streams Readable Interface.

    Parameters

    • Optional size: number

      The number of bytes to read asynchronously. This is currently not being used as only object mode is supported.

    Returns void

addListener

  • addListener(event: "close", listener: function): this
  • addListener(event: "data", listener: function): this
  • addListener(event: "end", listener: function): this
  • addListener(event: "readable", listener: function): this
  • addListener(event: "error", listener: function): this
  • addListener(event: string | symbol, listener: function): this
  • Event emitter The defined events on documents including:

    1. close
    2. data
    3. end
    4. readable
    5. error

    Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "data"
    • listener: function
        • (chunk: any): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

  • Parameters

    • event: "end"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "readable"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

destroy

  • destroy(error?: Error): void
  • Parameters

    • Optional error: Error

    Returns void

emit

  • emit(event: "close"): boolean
  • emit(event: "data", chunk: any): boolean
  • emit(event: "end"): boolean
  • emit(event: "readable"): boolean
  • emit(event: "error", err: Error): boolean
  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: "close"

    Returns boolean

  • Parameters

    • event: "data"
    • chunk: any

    Returns boolean

  • Parameters

    • event: "end"

    Returns boolean

  • Parameters

    • event: "readable"

    Returns boolean

  • Parameters

    • event: "error"
    • err: Error

    Returns boolean

  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

isPaused

  • isPaused(): boolean
  • Returns boolean

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: "close", listener: function): this
  • on(event: "data", listener: function): this
  • on(event: "end", listener: function): this
  • on(event: "readable", listener: function): this
  • on(event: "error", listener: function): this
  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "data"
    • listener: function
        • (chunk: any): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

  • Parameters

    • event: "end"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "readable"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: "close", listener: function): this
  • once(event: "data", listener: function): this
  • once(event: "end", listener: function): this
  • once(event: "readable", listener: function): this
  • once(event: "error", listener: function): this
  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "data"
    • listener: function
        • (chunk: any): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

  • Parameters

    • event: "end"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "readable"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

pause

  • pause(): this
  • Returns this

pipe

  • pipe<T>(destination: T, options?: object): T
  • Type parameters

    • T: WritableStream

    Parameters

    • destination: T
    • Optional options: object
      • Optional end?: boolean

    Returns T

prependListener

  • prependListener(event: "close", listener: function): this
  • prependListener(event: "data", listener: function): this
  • prependListener(event: "end", listener: function): this
  • prependListener(event: "readable", listener: function): this
  • prependListener(event: "error", listener: function): this
  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "data"
    • listener: function
        • (chunk: any): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

  • Parameters

    • event: "end"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "readable"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: "close", listener: function): this
  • prependOnceListener(event: "data", listener: function): this
  • prependOnceListener(event: "end", listener: function): this
  • prependOnceListener(event: "readable", listener: function): this
  • prependOnceListener(event: "error", listener: function): this
  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "data"
    • listener: function
        • (chunk: any): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

  • Parameters

    • event: "end"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "readable"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

push

  • push(chunk: any, encoding?: string): boolean
  • Parameters

    • chunk: any
    • Optional encoding: string

    Returns boolean

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

read

  • read(size?: number): any
  • Parameters

    • Optional size: number

    Returns any

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: "close", listener: function): this
  • removeListener(event: "data", listener: function): this
  • removeListener(event: "end", listener: function): this
  • removeListener(event: "readable", listener: function): this
  • removeListener(event: "error", listener: function): this
  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "data"
    • listener: function
        • (chunk: any): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

  • Parameters

    • event: "end"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "readable"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

resume

  • resume(): this
  • Returns this

setEncoding

  • setEncoding(encoding: string): this
  • Parameters

    • encoding: string

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

unpipe

  • unpipe(destination?: WritableStream): this
  • Parameters

    • Optional destination: WritableStream

    Returns this

unshift

  • unshift(chunk: any): void
  • Parameters

    • chunk: any

    Returns void

wrap

  • wrap(oldStream: ReadableStream): this
  • Parameters

    • oldStream: ReadableStream

    Returns this

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc