Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 1a53892c
authored
Jan 25, 2020
by
andres112013
Committed by
Sushant
Jan 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(typings): `comparator` arg of `Sequelize.where` (#11843)
1 parent
566cfa93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
types/lib/sequelize.d.ts
types/test/where.ts
types/lib/sequelize.d.ts
View file @
1a53892
...
...
@@ -1450,7 +1450,7 @@ export function or(...args: (WhereOperators | WhereAttributeHash | Where)[]): Or
export
function
json
(
conditionsOrPath
:
string
|
object
,
value
?:
string
|
number
|
boolean
):
Json
;
export
type
AttributeType
=
Fn
|
Col
|
Literal
|
ModelAttributeColumnOptions
|
string
;
export
type
LogicType
=
Fn
|
Col
|
Literal
|
OrOperator
|
AndOperator
|
WhereOperators
|
string
;
export
type
LogicType
=
Fn
|
Col
|
Literal
|
OrOperator
|
AndOperator
|
WhereOperators
|
string
|
symbol
|
null
;
/**
* A way of specifying attr = condition.
...
...
@@ -1470,7 +1470,7 @@ export type LogicType = Fn | Col | Literal | OrOperator | AndOperator | WhereOpe
* @param logic The condition. Can be both a simply type, or a further condition (`.or`, `.and`, `.literal`
* etc.)
*/
export
function
where
(
attr
:
AttributeType
,
comparator
:
string
,
logic
:
LogicType
):
Where
;
export
function
where
(
attr
:
AttributeType
,
comparator
:
string
|
symbol
,
logic
:
LogicType
):
Where
;
export
function
where
(
attr
:
AttributeType
,
logic
:
LogicType
):
Where
;
export
default
Sequelize
;
types/test/where.ts
View file @
1a53892
...
...
@@ -325,3 +325,13 @@ Sequelize.where(
[
Op
.
notILike
]:
Sequelize
.
literal
(
'LIT'
)
}
)
Sequelize
.
where
(
Sequelize
.
col
(
"ABS"
),
Op
.
is
,
null
);
Sequelize
.
where
(
Sequelize
.
fn
(
"ABS"
,
Sequelize
.
col
(
"age"
)),
Op
.
like
,
Sequelize
.
fn
(
"ABS"
,
Sequelize
.
col
(
"age"
))
);
Sequelize
.
where
(
Sequelize
.
col
(
"ABS"
),
null
);
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment