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

Function cmpJSONTypes

pkg/util/json/json.go:368–376  ·  view source on GitHub ↗
(a Type, b Type)

Source from the content-addressed store, hash-verified

366func (j jsonObject) tryDecode() (JSON, error) { return j, nil }
367
368func cmpJSONTypes(a Type, b Type) int {
369 if b > a {
370 return -1
371 }
372 if b < a {
373 return 1
374 }
375 return 0
376}
377
378func (j jsonNull) Compare(other JSON) (int, error) { return cmpJSONTypes(j.Type(), other.Type()), nil }
379func (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

Used in the wild real call sites across dependent graphs

searching dependent graphs…