Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SQLRowStream

A ReadStream of Rows from the underlying RDBMS. This class follows the ReadStream semantics and will automatically close the underlying resources if all returned rows are returned. For cases where the results are ignored before the full processing of the returned rows is complete the close method MUST be called in order to release underlying resources.

The interface is minimal in order to support all SQL clients not just JDBC.

Hierarchy

  • SQLRowStream

Implements

  • any

Index

Methods

close

  • close(): void
  • close(): PromiseLike<void>
  • close(handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • Closes the stream/underlying cursor(s). The actual close happens asynchronously.

    Returns void

  • Closes the stream/underlying cursor(s). The actual close happens asynchronously.

    Returns PromiseLike<void>

  • Closes the stream/underlying cursor(s). The actual close happens asynchronously.

    Parameters

    • handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns void

column

  • column(name: string): number
  • Will convert the column name to the json array index.

    Parameters

    • name: string

    Returns number

columns

  • columns(): string
  • Returns all column names available in the underlying resultset. One needs to carefully use this method since in contrast to the singular version it does not perform case insensitive lookups or takes alias in consideration on the column names.

    Returns string

endHandler

  • endHandler(endHandler: ((res: void) => void) | Handler<void> | null | undefined): SQLRowStream
  • Parameters

    • endHandler: ((res: void) => void) | Handler<void> | null | undefined

    Returns SQLRowStream

exceptionHandler

  • exceptionHandler(handler: ((res: Throwable) => void) | Handler<Throwable> | null | undefined): SQLRowStream
  • Parameters

    • handler: ((res: Throwable) => void) | Handler<Throwable> | null | undefined

    Returns SQLRowStream

fetch

  • fetch(arg0: number): ReadStream<any[]>
  • Parameters

    • arg0: number

    Returns ReadStream<any[]>

handler

  • handler(handler: ((res: any[]) => void) | Handler<any[]> | null | undefined): SQLRowStream
  • Parameters

    • handler: ((res: any[]) => void) | Handler<any[]> | null | undefined

    Returns SQLRowStream

moreResults

  • moreResults(): void
  • Request for more results if available

    Returns void

pause

  • Returns SQLRowStream

pipe

  • pipe(): Pipe<any[]>
  • Returns Pipe<any[]>

pipeTo

  • pipeTo(dst: WriteStream<any[]>): PromiseLike<void>
  • pipeTo(dst: WriteStream<any[]>, handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • Parameters

    • dst: WriteStream<any[]>

    Returns PromiseLike<void>

  • Parameters

    • dst: WriteStream<any[]>
    • handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns void

resultSetClosedHandler

  • resultSetClosedHandler(handler: ((res: void) => void) | Handler<void>): SQLRowStream
  • Event handler when a resultset is closed. This is useful to request for more results.

    Parameters

    • handler: ((res: void) => void) | Handler<void>

    Returns SQLRowStream

resume

  • Returns SQLRowStream

Generated using TypeDoc