mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
sequelize: fix FindOptions (#9073)
Fix FindOptions.attributes. Now allows a object having include and/or exclude properties. http://sequelize.readthedocs.org/en/latest/api/model/#findalloptions-promisearrayinstance
This commit is contained in:
committed by
Masahiro Wakame
parent
ed728ac598
commit
3abab28a3e
@@ -882,6 +882,8 @@ User.findAll( { order : [['id', ';DELETE YOLO INJECTIONS']] } );
|
||||
User.findAll( { include : [User], order : [[User, 'id', ';DELETE YOLO INJECTIONS']] } );
|
||||
User.findAll( { include : [User], order : [['id', 'ASC NULLS LAST'], [User, 'id', 'DESC NULLS FIRST']] } );
|
||||
User.findAll( { include : [{ model : User, where : { title : 'DoDat' }, include : [{ model : User }] }] } );
|
||||
User.findAll( { attributes: ['username', 'data']});
|
||||
User.findAll( { attributes: {include: ['username', 'data']} });
|
||||
|
||||
User.findById( 'a string' );
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -3121,7 +3121,7 @@ declare module "sequelize" {
|
||||
* `Sequelize.literal`, `Sequelize.fn` and so on), and the second is the name you want the attribute to
|
||||
* have in the returned instance
|
||||
*/
|
||||
attributes? : Array<string | [string, string]>;
|
||||
attributes? : Array<string> | { include?: Array<string>, exclude?: Array<string> };
|
||||
|
||||
/**
|
||||
* If true, only non-deleted records will be returned. If false, both deleted and non-deleted records will
|
||||
|
||||
Reference in New Issue
Block a user