Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Connection

Hierarchy

Index

Properties

_connection: mariadb.Connection
_instanceBuildmsqlMeta: UpsertResult | UpsertResult[]
info: null | ConnectionInfo

Connection information

threadId: null | number

Alias of info.threadId for compatibility

Methods

  • affectedRows(): number
  • beginTransaction(): Promise<void>
  • Permit to change user during connection. All user variables will be reset, Prepare commands will be released. !!! mysql has a bug when CONNECT_ATTRS capability is set, that is default !!!!

    Parameters

    Returns Promise<void>

  • commit(): Promise<void>
  • Commit a transaction.

    Returns Promise<void>

  • debug(value: boolean): void
  • Change option "debug" during connection.

    Parameters

    • value: boolean

    Returns void

  • debugCompress(value: boolean): void
  • Change option "debugCompress" during connection.

    Parameters

    • value: boolean

    Returns void

  • destroy(): void
  • Force connection termination by closing the underlying socket and killing server process if any.

    Returns void

  • end(): Promise<void>
  • Terminate connection gracefully.

    Returns Promise<void>

  • escape(value: any): string
  • This function permit to escape a parameter properly according to parameter type to avoid injection.

    Parameters

    • value: any

      parameter

    Returns string

  • escapeId(identifier: string): string
  • This function permit to escape a Identifier properly . See Identifier Names for escaping. Value will be enclosed by '' character if content doesn't satisfy: <OL> <LI>ASCII: [0-9,a-z,A-Z$_] (numerals 0-9, basic Latin letters, both lowercase and uppercase, dollar sign, underscore)</LI> <LI>Extended: U+0080 .. U+FFFF and escaping '' character if needed.

Parameters

Returns string

Generated using TypeDoc