CompareBools compares the input bools according to the SQL comparison rules.
(d, v bool)
| 388 | |
| 389 | // CompareBools compares the input bools according to the SQL comparison rules. |
| 390 | func CompareBools(d, v bool) int { |
| 391 | if !d && v { |
| 392 | return -1 |
| 393 | } |
| 394 | if d && !v { |
| 395 | return 1 |
| 396 | } |
| 397 | return 0 |
| 398 | } |
| 399 | |
| 400 | // Prev implements the Datum interface. |
| 401 | func (*DBool) Prev(_ *EvalContext) (Datum, bool) { |
no outgoing calls
no test coverage detected
searching dependent graphs…