Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MySQLClient

MySQL client which:
- handles pooled connections in cluster/non-cluster modes
- abstracts write & read pools for cluster/non-cluster modes
- logs mysql related events

Hierarchy

  • MySQLClient

Constructors

constructor

Methods

escape

  • escape(value: any): string
  • Escapes value before being part of SQL query.

    Parameters

    • value: any

      Value to be escaped.

    Returns string

    String escaped value.

getConnection

  • getConnection(type: QueryType): Promise<PoolConnection>
  • Get MySQL connection.

    Parameters

    Returns Promise<PoolConnection>

init

shutdown

  • shutdown(): Promise<void>
  • Shutdown client.

    Returns Promise<void>