knex-mysql-deadlock

1.0.0 • Public • Published

knex-mysql-deadlock

A custom knex mysql dialect, which does deadlock retries

Install

npm install knex mysql knex-mysql-deadlock

Usage

const knex = require('knex')({
  client: require('knex-mysql-deadlock'),
  connection: mysqlConfig
});

Specifying the number of deadlock retries, before throwing an error:

const knex = require('knex')({
  client: require('knex-mysql-deadlock'),
  connection: mysqlConfig,
  options: {
    deadlockRetries: 5
  }
});

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i knex-mysql-deadlock

      Weekly Downloads

      1

      Version

      1.0.0

      License

      ISC

      Last publish

      Collaborators

      • ecdeveloper