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

Function tsOperatorFromPgwireEncoding

pkg/util/tsearch/tsquery.go:97–109  ·  view source on GitHub ↗
(b byte)

Source from the content-addressed store, hash-verified

95}
96
97func tsOperatorFromPgwireEncoding(b byte) (tsOperator, error) {
98 switch b {
99 case 1:
100 return not, nil
101 case 2:
102 return and, nil
103 case 3:
104 return or, nil
105 case 4:
106 return followedby, nil
107 }
108 return invalid, errors.AssertionFailedf("no operator for pgwire byte %d", b)
109}
110
111// tsNode represents a single AST node within the tree of a TSQuery.
112type tsNode struct {

Callers 2

decodeTSNodeMethod · 0.85
decodeTSNodePGBinaryMethod · 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…