mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-22 11:40:10 +08:00
Merge pull request #8620 from salthense/master
Make connection optional for knex Config
This commit is contained in:
@@ -55,6 +55,16 @@ var knex = Knex({
|
||||
}
|
||||
});
|
||||
|
||||
// Pure Query Builder without a connection
|
||||
var knex = Knex({});
|
||||
|
||||
// Pure Query Builder without a connection, using a specific flavour of SQL
|
||||
var knex = Knex({
|
||||
client: 'pg'
|
||||
});
|
||||
|
||||
knex('books').insert({title: 'Test'}).returning('*').toString();
|
||||
|
||||
// Migrations
|
||||
var knex = Knex({
|
||||
client: 'mysql',
|
||||
|
||||
Vendored
+1
-1
@@ -409,7 +409,7 @@ declare module "knex" {
|
||||
debug?: boolean;
|
||||
client?: string;
|
||||
dialect?: string;
|
||||
connection: string|ConnectionConfig|MariaSqlConnectionConfig|
|
||||
connection?: string|ConnectionConfig|MariaSqlConnectionConfig|
|
||||
Sqlite3ConnectionConfig|SocketConnectionConfig;
|
||||
pool?: PoolConfig;
|
||||
migrations?: MigrationConfig;
|
||||
|
||||
Reference in New Issue
Block a user