Supported Drivers
By default, Knex support the following databases:
- PostgreSQL, CockrouchDB and Amazon Redshift through pg adapter.
- MySQL and MariaDB through mysql adapter.
- SQLite3 through sqlite3 adapter.
- MSSQL through tedious adapter.
In addition to those listed above, Dobo Knex also supports the following databases with some custom patches to ensure they work as smoothly as it possible:
- Manticoresearch through mysql adapter.
Example MySQL
Package install:
$ npm install mysql dobo dobo-knex
{data-dir}/config/.plugins
file:... dobo dobo-knex ...
{data-dir}/config/dobo.json
file:{ "connections": [{ "name": "default", "type": "dbknex:mysql", "connection": { "host": "localhost", "user": "myuser", "password": "mypassword", "database": "mydb" } }] }
Example SQLite3
Package install:
$ npm install sqlite3 dobo dobo-knex
{data-dir}/config/.plugins
file:... dobo dobo-knex ...
{data-dir}/config/dobo.json
file:{ "connections": [{ "name": "default", "type": "dbknex:sqlite3", "connection": { "filename": "mydatabase.sqlite3" } }] }