MCPcopy Create free account
hub / github.com/dolthub/doltgresql / cmpJSONTypes

Function cmpJSONTypes

postgres/parser/json/json.go:418–426  ·  view source on GitHub ↗
(a Type, b Type)

Source from the content-addressed store, hash-verified

416func (j jsonObject) tryDecode() (JSON, error) { return j, nil }
417
418func cmpJSONTypes(a Type, b Type) int {
419 if b > a {
420 return -1
421 }
422 if b < a {
423 return 1
424 }
425 return 0
426}
427
428func (j jsonNull) Compare(other JSON) (int, error) { return cmpJSONTypes(j.Type(), other.Type()), nil }
429func (j jsonFalse) Compare(other JSON) (int, error) { return cmpJSONTypes(j.Type(), other.Type()), nil }

Callers 8

CompareMethod · 0.85
CompareMethod · 0.85
CompareMethod · 0.85
CompareMethod · 0.85
CompareMethod · 0.85
CompareMethod · 0.85
CompareMethod · 0.85
CompareMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected