knex-mariadb

MariaDB Client for Knex.js

Usage no npm install needed!

<script type="module">
  import knexMariadb from 'https://cdn.skypack.dev/knex-mariadb';
</script>

README

knex-mariadb

js-semistandard-style npm version

MariaDB Client for Knex.js

Install

npm i --save-dev knex-mariadb

knex-mariadb has peer dependencies on knex and mariadb, please make sure that they are installed as well.

Usage

knex-mariadb should be compatible with mysql and mysql2 knex clients, see this page for connection options.

Note that you cannot pass client: 'mariadb' to Knex because this method can be used only with the "official" clients.

You should use something like this instead:

const mdb = require('knex-mariadb');
const knex = require('knex')({
  client: mdb,
  // Other options go here
});

Notes:

knex-mariadb 1.x is for knex up to 0.18.4 knex-mariadb 2.x is for knex 0.19+