提交 a8d1412a 编写于 作者: R Robin Dupret

Add a SQL example for `not` [ci skip]

To share a certain logic across other examples, let's add a sample SQL
code generated by the given Ruby code
上级 3f29a65c
......@@ -514,7 +514,13 @@ SELECT * FROM clients WHERE (clients.orders_count IN (1,3,5))
Post.where.not(author: author)
```
In other words, this query can be generated by calling `where` with no argument, then immediately chain with `not` passing `where` conditions.
In other words, this query can be generated by calling `where` with no argument,
then immediately chain with `not` passing `where` conditions. This will generate
SQL code like this:
```sql
SELECT * FROM posts WHERE (author_id != 1)
```
Ordering
--------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册