mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
[sequelize] add where option to DefineIndexesOptions for v4
This commit is contained in:
Vendored
+7
-2
@@ -3247,8 +3247,8 @@ declare namespace sequelize {
|
||||
* https://github.com/sequelize/sequelize/blob/master/docs/docs/models-usage.md#user-content-manipulating-the-dataset-with-limit-offset-order-and-group
|
||||
*/
|
||||
group?: string | string[] | Object;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Apply DISTINCT(col) for FindAndCount(all)
|
||||
*/
|
||||
@@ -4784,6 +4784,11 @@ declare namespace sequelize {
|
||||
*/
|
||||
operator?: string;
|
||||
|
||||
/**
|
||||
* Condition for partioal index
|
||||
*/
|
||||
where?: WhereOptions;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1285,7 +1285,10 @@ s.define( 'UserWithUniqueUsername', {
|
||||
name : 'user_and_email_index',
|
||||
unique : true,
|
||||
method : 'BTREE',
|
||||
fields : ['user_id', { attribute : 'email', collate : 'en_US', order : 'DESC', length : 5 }]
|
||||
fields : ['user_id', { attribute : 'email', collate : 'en_US', order : 'DESC', length : 5 }],
|
||||
where : {
|
||||
user_id : { $not: null }
|
||||
}
|
||||
},
|
||||
{
|
||||
fields: ['data'],
|
||||
|
||||
Reference in New Issue
Block a user