@breautek/storm
    Preparing search index...

    Class DatabaseConnection<TAPI>Abstract

    Do not call new Database directly. Use Database.getConnection to create a DatabaseConnection object.

    IDatabaseConnection

    Type Parameters

    • TAPI

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Methods

    • Implementation to close the connection, if forceClose is true, close the connection no matter what. Silently error if it means the connection is closed.

      Parameters

      • forceClose: boolean

        boolean, if true, should close the connection no matter what.

      Returns Promise<void>

      Promise

    • Implementation method to return a dataset from the database like query(), but returns a Readable stream instead.

      Parameters

      • query: string

        The database query

      • Optionalparams: any

        The query parameters

      • OptionalstreamOptions: any

        Readable stream options

      Returns Readable

      Readable

    • Closes the connection. May error if connection has an active transaction. if forceClose boolean is true, it will force close the connection, regardless of transaction state.

      Parameters

      • forceClose: boolean = false

        optional boolean

      Returns Promise<void>

      Promise

    • Ends a transaction. if requiresRollback is true, then rollback() is invoked. Otherwise, commit() is invoked.

      Parameters

      • OptionalrequiresRollback: boolean

        optional boolean

      Returns Promise<void>

      Promise