Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SqlConnection

A SQL connection.

Hierarchy

  • Disposable
    • SqlConnection

Implemented by

Index

Constructors

Properties

Methods

Constructors

constructor

  • Creates a new Disposable calling the provided function on dispose.

    Parameters

    • callOnDispose: Function

      Function that disposes something.

    Returns SqlConnection

Properties

close

close: function

Closes the connection.

returns

The promise that indicates if operation was successful or not.

Type declaration

    • (): PromiseLike<boolean>
    • Returns PromiseLike<boolean>

connection

connection: any

The underlying connection object.

query

query: function

Starts a query.

param

The SQL command.

param

One or more arguments for the command.

returns

The promise with the result(s).

Type declaration

    • (sql: string, ...args: any[]): PromiseLike<SqlResult[]>
    • Parameters

      • sql: string
      • Rest ...args: any[]

      Returns PromiseLike<SqlResult[]>

type

The type.

Methods

dispose

  • dispose(): any
  • Dispose this object.

    Returns any

Static from

  • from(...disposableLikes: object[]): Disposable
  • Combine many disposable-likes into one. Use this method when having objects with a dispose function which are not instances of Disposable.

    Parameters

    • Rest ...disposableLikes: object[]

      Objects that have at least a dispose-function member.

    Returns Disposable

    Returns a new disposable which, upon dispose, will dispose all provided disposables.

Generated using TypeDoc