3.1.1 • Published 4 months ago

@tanjaae/knex-mysql2-deadlock v3.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

knex-mysql2-deadlock

An enhanced version of knex-mysql-deadlock for mysql2. In addition to supporting mysql2 clients, this module addresses an issue with the original implementation regarding support for ER_LOCK_DEADLOCK and provides additional flexibility around retries.

Install

npm install knex mysql2 knex-mysql2-deadlock

Usage

const knex = require('knex')({
  client: require('knex-mysql2-deadlock'),
  connection: mysqlConfig,
  options: {
    // See below
  }
});

The following options are supported:

  • deadlockRetries - Specifies the number retries that should be attempted upon receiving a deadlock. Default is 5.
  • deadlockRetryDelay - Specifies the delay between retries, in ms.
  • logger - An alternative logger. Default is console.
3.1.1

4 months ago

3.1.0

4 months ago

2.1.0

9 months ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago

1.0.1

2 years ago