https://github.com/sjinks/knex-mariadb
MariaDB Client for Knex.js
https://github.com/sjinks/knex-mariadb
knex knex-mariadb knexjs mariadb
Last synced: 5 months ago
JSON representation
MariaDB Client for Knex.js
- Host: GitHub
- URL: https://github.com/sjinks/knex-mariadb
- Owner: sjinks
- License: mit
- Archived: true
- Created: 2019-07-05T22:43:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-28T06:03:22.000Z (10 months ago)
- Last Synced: 2025-04-14T12:55:23.656Z (6 months ago)
- Topics: knex, knex-mariadb, knexjs, mariadb
- Language: JavaScript
- Homepage: https://wildwolf.name/mariadb-driver-for-knex/
- Size: 134 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# knex-mariadb
[](https://github.com/Flet/semistandard)
[](https://www.npmjs.com/package/knex-mariadb)MariaDB Client for Knex.js
# Install
```bash
npm i --save-dev knex-mariadb
````knex-mariadb` has peer dependencies on [`knex`](https://www.npmjs.com/package/knex) and [`mariadb`](https://www.npmjs.com/package/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](https://knexjs.org/#Installation-client) 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:
```js
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+