mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-04-28 05:12:41 +00:00
doc(faq): fix wording for empty cases
This commit is contained in:
6
FAQ.md
6
FAQ.md
@@ -35,10 +35,10 @@ Note that you can use any operator that returns a boolean, but beware that `!= A
|
|||||||
|
|
||||||
The equivalent of `NOT IN (...)` would be `!= ALL($1)`:
|
The equivalent of `NOT IN (...)` would be `!= ALL($1)`:
|
||||||
|
|
||||||
`lhs != ALL(rhs) -> lhs != rhs[0] AND lhs != rhs[1] AND ... lhs != rhs[length(rhs) - 1]`
|
`lhs != ALL(rhs) -> true AND lhs != rhs[0] AND lhs != rhs[1] AND ... lhs != rhs[length(rhs) - 1]`
|
||||||
|
|
||||||
Note that `ANY` with any operator with an empty array will return `false`, thus the leading `false OR ...`,
|
Note that `ANY` using any operator and passed an empty array will return `false`, thus the leading `false OR ...`.
|
||||||
while `ALL` with an empty array will return `true`, thus the leading `true AND ...`.
|
Meanwhile, `ALL` with any operator and passed an empty array will return `true`, thus the leading `true AND ...`.
|
||||||
|
|
||||||
See also: [Postgres Manual, Section 9.24: Row and Array Comparisons](https://www.postgresql.org/docs/current/functions-comparisons.html)
|
See also: [Postgres Manual, Section 9.24: Row and Array Comparisons](https://www.postgresql.org/docs/current/functions-comparisons.html)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user