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

Function DecodeTSQueryPGBinary

pkg/util/tsearch/encoding.go:221–233  ·  view source on GitHub ↗

DecodeTSQueryPGBinary deserializes a serialized TSQuery in pgwire format.

(b []byte)

Source from the content-addressed store, hash-verified

219
220// DecodeTSQueryPGBinary deserializes a serialized TSQuery in pgwire format.
221func DecodeTSQueryPGBinary(b []byte) (ret TSQuery, err error) {
222 var nTokens uint32
223 b, nTokens, err = encoding.DecodeUint32Ascending(b)
224 if err != nil {
225 return ret, err
226 }
227 decoder := tsNodeCodec{nTokens: int(nTokens)}
228 _, ret.root, err = decoder.decodeTSNodePGBinary(b)
229 if err != nil {
230 return ret, err
231 }
232 return ret, nil
233}
234
235type tsNodeCodec struct {
236 nTokens int

Callers

nothing calls this directly

Calls 2

decodeTSNodePGBinaryMethod · 0.95
DecodeUint32AscendingFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…