MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Compare

Method Compare

pkg/sql/sem/tree/datum.go:535–545  ·  view source on GitHub ↗

Compare implements the Datum interface.

(ctx *EvalContext, other Datum)

Source from the content-addressed store, hash-verified

533
534// Compare implements the Datum interface.
535func (d *DBitArray) Compare(ctx *EvalContext, other Datum) int {
536 if other == DNull {
537 // NULL is less than any non-NULL value.
538 return 1
539 }
540 v, ok := UnwrapDatum(ctx, other).(*DBitArray)
541 if !ok {
542 panic(makeUnsupportedComparisonMessage(d, other))
543 }
544 return bitarray.Compare(d.BitArray, v.BitArray)
545}
546
547// Prev implements the Datum interface.
548func (d *DBitArray) Prev(_ *EvalContext) (Datum, bool) {

Callers

nothing calls this directly

Calls 3

CompareFunction · 0.92
UnwrapDatumFunction · 0.85

Tested by

no test coverage detected