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

Function IsNextByteArrayEncodedNull

pkg/util/encoding/encoding.go:3698–3704  ·  view source on GitHub ↗

IsNextByteArrayEncodedNull returns if the first byte in the input is the NULL encoded byte within an array key.

(buf []byte, dir Direction)

Source from the content-addressed store, hash-verified

3696// IsNextByteArrayEncodedNull returns if the first byte in the input
3697// is the NULL encoded byte within an array key.
3698func IsNextByteArrayEncodedNull(buf []byte, dir Direction) bool {
3699 expected := ascendingNullWithinArrayKey
3700 if dir == Descending {
3701 expected = descendingNullWithinArrayKey
3702 }
3703 return buf[0] == expected
3704}
3705
3706// ValidateAndConsumeJSONKeyMarker checks that the marker at the front
3707// of buf is valid/invalid for a given JSON value for the given direction.

Callers 1

prettyPrintFirstValueFunction · 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…