mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
[sequelize] Add the "nested" property to IncludeOptions interface
This commit is contained in:
Vendored
+6
@@ -13,6 +13,7 @@
|
||||
// Florian Oellerich <https://github.com/Raigen>
|
||||
// Todd Bealmear <https://github.com/todd>
|
||||
// Nick Schultz <https://github.com/nrschultz>
|
||||
// Thomas Breleur <https://github.com/thomas-b>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -3270,6 +3271,11 @@ declare namespace sequelize {
|
||||
paranoid?: boolean;
|
||||
|
||||
all?: boolean | string;
|
||||
|
||||
/**
|
||||
* if true, it will also eager load the relations of the child models, recursively.
|
||||
*/
|
||||
nested?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -933,6 +933,7 @@ User.findAll( { include : [{ all : 'HasMany', attributes : ['name'] }] } );
|
||||
User.findAll( { include : [{ all : true }, { model : User, attributes : ['id'] }] } );
|
||||
User.findAll( { include : [{ all : 'BelongsTo' }] } );
|
||||
User.findAll( { include : [{ all : true }] } );
|
||||
User.findAll( { include : [{ nested : true }] } );
|
||||
User.findAll( { where : { username : 'barfooz' }, raw : true } );
|
||||
User.findAll( { where : { name : 'worker' }, include : [{ model : User, as : 'ToDos' }] } );
|
||||
User.findAll( { where : { user_id : 1 }, attributes : ['a', 'b'], include : [{ model : User, attributes : ['c'] }] } );
|
||||
|
||||
Reference in New Issue
Block a user