Class StreamAbstract

A stream for executing SQL statements (a "database connection").

Hierarchy

Properties

intMode: IntMode

Representation of integers returned from the database. See IntMode.

This value affects the results of all operations on this stream.

Accessors

  • get closed(): boolean
  • True if the stream is closed or closing.

    If you call closeGracefully, this will become true immediately, even if the underlying stream is not physically closed yet.

    Returns boolean

Methods

  • Return a builder for creating and executing a batch.

    If useCursor is true, the batch will be executed using a Hrana cursor, which will stream results from the server to the client, which consumes less memory on the server. This requires protocol version 3 or higher.

    Parameters

    • useCursor: boolean = false

    Returns Batch

  • Immediately close the stream.

    This closes the stream immediately, aborting any pending operations.

    Returns void

  • Gracefully close the stream.

    After calling this method, you will not be able to start new operations, but existing operations will complete.

    Returns void

  • Check whether the SQL connection underlying this stream is in autocommit state (i.e., outside of an explicit transaction). This requires protocol version 3 or higher.

    Returns Promise<boolean>

  • Execute a sequence of statements separated by semicolons. This requires protocol version 2 or higher.

    Parameters

    Returns Promise<void>

Generated using TypeDoc