mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add a configuration config object that supports mariasql client syntax
This commit is contained in:
@@ -22,6 +22,18 @@ var knex = Knex({
|
||||
}
|
||||
});
|
||||
|
||||
// Mariasql configuration
|
||||
var knex = Knex({
|
||||
debug: true,
|
||||
client: 'mariasql',
|
||||
connection: {
|
||||
host : '127.0.0.1',
|
||||
user : 'your_database_user',
|
||||
password : 'your_database_password',
|
||||
db : 'myapp_test'
|
||||
}
|
||||
});
|
||||
|
||||
// Pooling
|
||||
var knex = Knex({
|
||||
client: 'mysql',
|
||||
|
||||
Vendored
+9
-1
@@ -399,7 +399,7 @@ declare module "knex" {
|
||||
debug?: boolean;
|
||||
client?: string;
|
||||
dialect?: string;
|
||||
connection: string|ConnectionConfig|
|
||||
connection: string|ConnectionConfig|MariaSqlConnectionConfig|
|
||||
Sqlite3ConnectionConfig|SocketConnectionConfig;
|
||||
pool?: PoolConfig;
|
||||
migrations?: MigrationConfig;
|
||||
@@ -413,6 +413,14 @@ declare module "knex" {
|
||||
debug?: boolean;
|
||||
}
|
||||
|
||||
interface MariaSqlConnectionConfig {
|
||||
host: string;
|
||||
user: string;
|
||||
password: string;
|
||||
db: string;
|
||||
debug?: boolean;
|
||||
}
|
||||
|
||||
/** Used with SQLite3 adapter */
|
||||
interface Sqlite3ConnectionConfig {
|
||||
filename: string;
|
||||
|
||||
Reference in New Issue
Block a user