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

Function PeekType

pkg/util/encoding/encoding.go:1804–1809  ·  view source on GitHub ↗

PeekType peeks at the type of the value encoded at the start of b.

(b []byte)

Source from the content-addressed store, hash-verified

1802
1803// PeekType peeks at the type of the value encoded at the start of b.
1804func PeekType(b []byte) Type {
1805 if len(b) >= 1 {
1806 return typMap[b[0]]
1807 }
1808 return Unknown
1809}
1810
1811// slowPeekType is the old implementation of PeekType. It's used to generate
1812// the lookup table for PeekType.

Callers 15

DecodeIfNullFunction · 0.85
DecodeIfNotNullFunction · 0.85
decodeTimeFunction · 0.85
DecodeBox2DAscendingFunction · 0.85
DecodeBox2DDescendingFunction · 0.85
DecodeGeoAscendingFunction · 0.85
DecodeGeoDescendingFunction · 0.85
decodeTimeTZFunction · 0.85
DecodeDurationAscendingFunction · 0.85
DecodeDurationDescendingFunction · 0.85
DecodeBitArrayAscendingFunction · 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…