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

Hierarchy

Implements

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.

    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

  • 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