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

Function EncodeJSONValueLength

pkg/util/encoding/encoding.go:3632–3641  ·  view source on GitHub ↗
(buf []byte, dir Direction, v int64)

Source from the content-addressed store, hash-verified

3630}
3631
3632func EncodeJSONValueLength(buf []byte, dir Direction, v int64) []byte {
3633 switch dir {
3634 case Ascending:
3635 return EncodeVarintAscending(buf, v)
3636 case Descending:
3637 return EncodeVarintDescending(buf, v)
3638 default:
3639 panic("invalid direction")
3640 }
3641}
3642
3643func DecodeJSONValueLength(buf []byte, dir Direction) ([]byte, int64, error) {
3644 var v int64

Callers 2

EncodeForwardIndexMethod · 0.92
EncodeForwardIndexMethod · 0.92

Calls 2

EncodeVarintAscendingFunction · 0.85
EncodeVarintDescendingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…