MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / slowContains

Method slowContains

pkg/util/json/contains_testers.go:63–81  ·  view source on GitHub ↗
(other JSON)

Source from the content-addressed store, hash-verified

61}
62
63func (j jsonArray) slowContains(other JSON) bool {
64 other = other.MaybeDecode()
65 if ary, ok := other.(jsonArray); ok {
66 for i := 0; i < len(ary); i++ {
67 found := false
68 for k := 0; k < len(j); k++ {
69 if j[k].Type() == ary[i].Type() && j[k].(containsTester).slowContains(ary[i]) {
70 found = true
71 break
72 }
73 }
74 if !found {
75 return false
76 }
77 }
78 return true
79 }
80 return false
81}
82
83func (j jsonObject) slowContains(other JSON) bool {
84 other = other.MaybeDecode()

Callers

nothing calls this directly

Calls 3

MaybeDecodeMethod · 0.65
TypeMethod · 0.65
slowContainsMethod · 0.65

Tested by

no test coverage detected