Compare implements the Datum interface.
(ctx *EvalContext, other Datum)
| 375 | |
| 376 | // Compare implements the Datum interface. |
| 377 | func (d *DBool) Compare(ctx *EvalContext, other Datum) int { |
| 378 | if other == DNull { |
| 379 | // NULL is less than any non-NULL value. |
| 380 | return 1 |
| 381 | } |
| 382 | v, ok := UnwrapDatum(ctx, other).(*DBool) |
| 383 | if !ok { |
| 384 | panic(makeUnsupportedComparisonMessage(d, other)) |
| 385 | } |
| 386 | return CompareBools(bool(*d), bool(*v)) |
| 387 | } |
| 388 | |
| 389 | // CompareBools compares the input bools according to the SQL comparison rules. |
| 390 | func CompareBools(d, v bool) int { |
nothing calls this directly
no test coverage detected