mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
the order of returned values was flipped
This commit is contained in:
Vendored
+2
-2
@@ -4006,9 +4006,9 @@ declare namespace sequelize {
|
||||
* whether the row was inserted or not.
|
||||
*/
|
||||
upsert(values: TAttributes, options?: UpsertOptions & { returning: false | undefined }): Promise<boolean>;
|
||||
upsert(values: TAttributes, options?: UpsertOptions & { returning: true }): Promise<[boolean, TInstance]>;
|
||||
upsert(values: TAttributes, options?: UpsertOptions & { returning: true }): Promise<[TInstance, boolean]>;
|
||||
insertOrUpdate(values: TAttributes, options?: UpsertOptions & { returning: false | undefined }): Promise<boolean>;
|
||||
insertOrUpdate(values: TAttributes, options?: UpsertOptions & { returning: true }): Promise<[boolean, TInstance]>;
|
||||
insertOrUpdate(values: TAttributes, options?: UpsertOptions & { returning: true }): Promise<[TInstance, boolean]>;
|
||||
|
||||
/**
|
||||
* Create and insert multiple instances in bulk.
|
||||
|
||||
@@ -1044,7 +1044,7 @@ findOrRetVal = User.findOrCreate( { where : { email : 'unique.email.@d.com', com
|
||||
findOrRetVal = User.findOrCreate( { where : { objectId : 1 }, defaults : { bool : false } } );
|
||||
|
||||
let upsertPromiseNoOptions: Bluebird<boolean> = User.upsert( { id : 42, username : 'doe', foo : s.fn( 'upper', 'mixedCase2' ) } );
|
||||
let upsertPromiseReturning: Bluebird<[boolean, AnyInstance]> = User.upsert( { id : 42, username : 'doe', foo : s.fn( 'upper', 'mixedCase2' ) }, { returning: true } );
|
||||
let upsertPromiseReturning: Bluebird<[AnyInstance, boolean]> = User.upsert( { id : 42, username : 'doe', foo : s.fn( 'upper', 'mixedCase2' ) }, { returning: true } );
|
||||
let upsertPromiseNotReturning: Bluebird<boolean> = User.upsert( { id : 42, username : 'doe', foo : s.fn( 'upper', 'mixedCase2' ) }, { returning: false } );
|
||||
|
||||
User.bulkCreate( [{ aNumber : 10 }, { aNumber : 12 }] ).then( ( i ) => i[0].isNewRecord );
|
||||
|
||||
Reference in New Issue
Block a user