mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
Add a configuration config object that supports mariasql client syntax
This commit is contained in:
1 parent
b57c33fec0
commit
51e1f71209
2 files changed
+21
-1
No files matched your search
@@ -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