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

Function EncodeContainingInvertedIndexSpans

pkg/util/json/json.go:1077–1083  ·  view source on GitHub ↗

EncodeContainingInvertedIndexSpans takes in a key prefix and returns the spans that must be scanned in the inverted index to evaluate a contains (@>) predicate with the given JSON (i.e., find the objects in the index that contain the given JSON). The spans are returned in an inverted.SpanExpression

(
	b []byte, json JSON,
)

Source from the content-addressed store, hash-verified

1075//
1076// The input inKey is prefixed to the keys in all returned spans.
1077func EncodeContainingInvertedIndexSpans(
1078 b []byte, json JSON,
1079) (invertedExpr inverted.Expression, err error) {
1080 return json.encodeContainingInvertedIndexSpans(
1081 encoding.EncodeJSONAscending(b), true /* isRoot */, false, /* isObjectValue */
1082 )
1083}
1084
1085// EncodeContainedInvertedIndexSpans takes in a key prefix and returns the
1086// spans that must be scanned in the inverted index to evaluate a contained by

Callers

nothing calls this directly

Calls 2

EncodeJSONAscendingFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…