Compare implements the Datum interface.
(ctx *EvalContext, other Datum)
| 1386 | |
| 1387 | // Compare implements the Datum interface. |
| 1388 | func (d *DBytes) Compare(ctx *EvalContext, other Datum) int { |
| 1389 | if other == DNull { |
| 1390 | // NULL is less than any non-NULL value. |
| 1391 | return 1 |
| 1392 | } |
| 1393 | v, ok := UnwrapDatum(ctx, other).(*DBytes) |
| 1394 | if !ok { |
| 1395 | panic(makeUnsupportedComparisonMessage(d, other)) |
| 1396 | } |
| 1397 | if *d < *v { |
| 1398 | return -1 |
| 1399 | } |
| 1400 | if *d > *v { |
| 1401 | return 1 |
| 1402 | } |
| 1403 | return 0 |
| 1404 | } |
| 1405 | |
| 1406 | // Prev implements the Datum interface. |
| 1407 | func (d *DBytes) Prev(_ *EvalContext) (Datum, bool) { |
nothing calls this directly
no test coverage detected