From 2085793a2c7cbed962bda47c42565f2f4c9d7fda Mon Sep 17 00:00:00 2001 From: Jon Sheppard Date: Sat, 20 Feb 2016 19:42:26 +1100 Subject: [PATCH] Update knex.d.ts MariaConnectionConfig to support all properties defined for mariasql driver --- knex/knex.d.ts | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/knex/knex.d.ts b/knex/knex.d.ts index 224de67568..f1f438bcae 100644 --- a/knex/knex.d.ts +++ b/knex/knex.d.ts @@ -413,12 +413,36 @@ declare module "knex" { debug?: boolean; } + // Config object for mariasql: https://github.com/mscdex/node-mariasql#client-methods interface MariaSqlConnectionConfig { - host: string; - user: string; - password: string; - db: string; - debug?: boolean; + user?: string; + password?: string; + host?: string; + port?: number; + unixSocket?: string; + protocol?: string; + db?: string; + keepQueries?: boolean; + multiStatements?: boolean; + connTimeout?: number; + pingInterval?: number; + secureAuth?: boolean; + compress?: boolean; + ssl?: boolean|MariaSslConfiguration; + local_infile?: boolean; + read_default_file?: string; + read_default_group?: string; + charset?: string; + streamHWM?: number; + } + + interface MariaSslConfiguration { + key?: string; + cert?: string; + ca?: string; + capath?: string; + cipher?: string; + rejectUnauthorized?: boolean; } /** Used with SQLite3 adapter */