Supported Drivers

Supported Drivers

By default, Knex support the following databases:

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:

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"
        }
      }]
    }