UNPKG

dobo-knex

Version:
68 lines (53 loc) 2.97 kB
# Config Object | Key Name | Type | Default | Description | | ------- | ---- | ----- | ----------- | | ```connOptions``` | ```object``` || Common Knex options | |     ```compileSqlOnError``` | ```boolean``` | ```false``` || |     ```...``` ||| See knex options | | ```manticoresearch``` | ```object``` || Common manticoresearch options | |     ```maxMatches``` | ```number``` | 1000 || |     ```...``` ||| See manticoresearch options | ## Driver Specific Connection These driver specific connection objects should be used as your **Dobo connection** object's array written in your ```{dataDir}/config/dobo.json```, NOT in ```{dataDir}/config/doboKnex.json```. See Dobo's Config Object for more info on this topic. ### General | Key Name | Type | Default | Description | | ------- | ---- | ----- | ----------- | | ```name``` | ```string``` | ```default``` | Connection name | | ```type``` | ```string``` || Connection's driver type. See below | | ```connection``` | ```object``` || Connection details | |     ```host``` | ```string``` | ```127.0.0.1``` | Hostname/ip to connect to | |     ```port``` | ```number``` || Defaults to DB's default port | |     ```user``` | ```string``` || Username to connect as | |     ```password``` | ```string``` || User's password | |     ```database``` | ```string``` || Database name | |     ```...``` ||| See knex *connection* config | | ```useNullAsDefault``` | ```boolean``` | ```true``` | See knex options | | ```...``` ||| See knex options | ### SQLite3 | Key Name | Type | Default | Description | | ------- | ---- | ----- | ----------- | | ```...``` ||| See knex options | | ```connection``` | ```object``` || Connection details | |     ```filename``` | ```string``` || Path to database file | | ```...``` ||| See knex options | Directory to database file, if not specifed, defaults to ```{dataDir}/plugins/dobo/db/{filename}``` if ```{filename}``` is ```:memory:```, it turns on SQLite3 memory database Directory tokens are supported, it will be replaced by its respected values if any are found: - ```{appDir}``` - ```{dataDir}``` - ```{tmp-dir}``` ### Driver Types Very similar to ```client``` option Knexjs's term, it should be one of: - ```dbknex:better-sqlite3```, driver: better-sqlite3 - ```dbknex:cockcrouchdb```, driver: pg - ```dbknex:mssql```, driver: tedious - ```dbknex:mysql```, driver: mysql - ```dbknex:mysql2```, driver: mysql2 - ```dbknex:oracle```, driver: oracle - ```dbknex:oracledb```, driver: oracledb - ```dbknex:pg-native```, driver: pg-native - ```dbknex:postgres```, driver: pg - ```dbknex:redshift```, driver: pg - ```dbknex:sqlite3```, driver: sqlite3 - ```dbknex:manticoresearch```, driver: mysql