Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DriverUtils

Common driver utility functions.

Hierarchy

  • DriverUtils

Index

Methods

Static buildColumnAlias

  • buildColumnAlias(__namedParameters: object, alias: string, column: string): string
  • Builds column alias from given alias name and column name, If alias length is greater than the limit (if any) allowed by the current driver, abbreviates the longest part (alias or column name) in the resulting alias.

    Parameters

    • __namedParameters: object
      • maxAliasLength: number
    • alias: string

      Alias part.

    • column: string

      Name of the column to be concatened to alias.

    Returns string

    An alias allowing to select/transform the target column.

Static buildDriverOptions

  • buildDriverOptions(options: any, buildOptions?: object): any
  • Normalizes and builds a new driver options. Extracts settings from connection url and sets to a new options object.

    Parameters

    • options: any
    • Optional buildOptions: object
      • useSid: boolean

    Returns any

Static Private parseConnectionUrl

  • parseConnectionUrl(url: string): object
  • Extracts connection data from the connection url.

    Parameters

    • url: string

    Returns object

    • database: string
    • host: string
    • password: string
    • port: number
    • type: string
    • username: string

Generated using TypeDoc