mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #21811 from baronfel/undefined_trx
[knex] allow for undefined transactions
This commit is contained in:
Vendored
+1
-1
@@ -156,7 +156,7 @@ declare namespace Knex {
|
||||
delete(returning?: string | string[]): QueryBuilder;
|
||||
truncate(): QueryBuilder;
|
||||
|
||||
transacting(trx: Transaction): QueryBuilder;
|
||||
transacting(trx?: Transaction): QueryBuilder;
|
||||
connection(connection: any): QueryBuilder;
|
||||
|
||||
clone(): QueryBuilder;
|
||||
|
||||
@@ -672,6 +672,9 @@ knex.transaction<{ length: number }>(function(trx) {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
// transacting handles undefined
|
||||
knex.insert({ name: 'Old Books'}).transacting(undefined);
|
||||
|
||||
knex.schema.withSchema("public").hasTable("table") as Promise<boolean>;
|
||||
|
||||
knex.schema.createTable('users', function (table) {
|
||||
|
||||
Reference in New Issue
Block a user