mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #32706 from YaroslavRepeta/buffer-in-where-clause
[Sequelize] Buffer/Buffer[]/boolean[] in where clause
This commit is contained in:
Vendored
+2
-1
@@ -3187,8 +3187,9 @@ declare namespace sequelize {
|
||||
* We did put Object in the end, because there where query might be a JSON Blob. It cripples a bit the
|
||||
* typesafety, but there is no way to pass the tests if we just remove it.
|
||||
*/
|
||||
type Primitives = string | number | boolean | Buffer;
|
||||
type WhereOptions<T> = {
|
||||
[P in keyof T]?: string | number | boolean | WhereLogic | WhereOptions<T[P]> | col | and | or | WhereGeometryOptions | WhereNested | Array<string | number> | null;
|
||||
[P in keyof T]?: Primitives | Array<Primitives> | WhereLogic | (T[P] extends Primitives ? null : WhereOptions<T[P]>) | col | and | or | WhereGeometryOptions | WhereNested | null;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -922,6 +922,9 @@ User.findAll( { include : [{ model : Task, paranoid: false }] } );
|
||||
User.findAll( { transaction : t } );
|
||||
User.findAll( { where : { data : { name : { last : 's' }, employment : { $ne : 'a' } } }, order : [['id', 'ASC']] } );
|
||||
User.findAll( { where : { username : ['boo', 'boo2'] } } );
|
||||
User.findAll( { where : { username : Buffer.from("a name") } } );
|
||||
User.findAll( { where : { username : [Buffer.from("a name")] } } );
|
||||
User.findAll( { where : { username : [true] } } );
|
||||
User.findAll( { where : { username : { like : '%2' } } } );
|
||||
User.findAll( { where : { theDate : { '..' : ['2013-01-02', '2013-01-11'] } } } );
|
||||
User.findAll( { where : { intVal : { '!..' : [8, 10] } } } );
|
||||
|
||||
Reference in New Issue
Block a user