Compare implements the Datum interface.
(ctx *EvalContext, other Datum)
| 1299 | |
| 1300 | // Compare implements the Datum interface. |
| 1301 | func (d *DCollatedString) Compare(ctx *EvalContext, other Datum) int { |
| 1302 | if other == DNull { |
| 1303 | // NULL is less than any non-NULL value. |
| 1304 | return 1 |
| 1305 | } |
| 1306 | v, ok := UnwrapDatum(ctx, other).(*DCollatedString) |
| 1307 | if !ok || d.Locale != v.Locale { |
| 1308 | panic(makeUnsupportedComparisonMessage(d, other)) |
| 1309 | } |
| 1310 | return bytes.Compare(d.Key, v.Key) |
| 1311 | } |
| 1312 | |
| 1313 | // Prev implements the Datum interface. |
| 1314 | func (d *DCollatedString) Prev(_ *EvalContext) (Datum, bool) { |
nothing calls this directly
no test coverage detected