Function getSqlPool

  • Uses a connection from a connection pool to run SQL to get values

    Type Parameters

    • T

    Parameters

    • config: ConnectionAttributes

      The DBConfig object to get the connection from

    • sql: Sql

      The SQL to execute - the result of the sql template tag - Should be a SELECT type for this

    • Optional options: ExecuteOptions

      The oracle options for the SQL execution

    Returns Promise<T[]>

    The response data as an array

  • Uses a connection from a connection pool to run SQL to get values

    Type Parameters

    • T

    Parameters

    • config: ConnectionAttributes

      The DBConfig object to get the connection from

    • sql: Sql

      The SQL to execute - the result of the sql template tag - Should be a SELECT type for this

    • options: ExecuteOptions

      The oracle options for the SQL execution

    • cb: ((record) => void)

      A callback method to allow you to take the return from the sql and transform the object. This is in lieu of returning an array of data.

        • (record): void
        • Parameters

          • record: T

          Returns void

    Returns Promise<void>

    Nothing if there is a callback

  • Uses a connection from a connection pool to run SQL to get values

    Type Parameters

    • T

    Parameters

    • config: ConnectionAttributes

      The DBConfig object to get the connection from

    • sql: string

      The SQL to execute - Should be a SELECT type for this

    • Optional params: BindParameters

      The Parameters to pass into the SQL execution

    • Optional options: ExecuteOptions

      The oracle options for the SQL execution

    Returns Promise<T[]>

    The response data as an array

  • Uses a connection from a connection pool to run SQL to get values

    Type Parameters

    • T

    Parameters

    • config: ConnectionAttributes

      The DBConfig object to get the connection from

    • sql: string

      The SQL to execute - Should be a SELECT type for this

    • params: BindParameters

      The Parameters to pass into the SQL execution

    • options: ExecuteOptions

      The oracle options for the SQL execution

    • cb: ((record) => void)

      A callback method to allow you to take the return from the sql and transform the object. This is in lieu of returning an array of data.

        • (record): void
        • Parameters

          • record: T

          Returns void

    Returns Promise<void>

    Nothing if there is a callback instead

Generated using TypeDoc