不要怂,就是干,撸起袖子干!

Commit 21e830d3 by Laurens Committed by Sushant

docs(querying): added examples for querying with operators (#8608)

1 parent 0047dca9
Showing with 16 additions and 0 deletions
......@@ -93,6 +93,22 @@ Post.findAll({
});
// SELECT * FROM post WHERE authorId = 12 AND status = 'active';
Post.findAll({
where: {
[Op.or]: [{authorId: 12}, {authorId: 13}]
}
});
// SELECT * FROM post WHERE authorId = 12 OR authorId = 13;
Post.findAll({
where: {
authorId: {
[Op.or]: [12, 13]
}
}
});
// SELECT * FROM post WHERE authorId = 12 OR authorId = 13;
Post.destroy({
where: {
status: 'inactive'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!