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

Function decodeTime

pkg/util/encoding/encoding.go:1247–1261  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

1245}
1246
1247func decodeTime(b []byte) (r []byte, sec int64, nsec int64, err error) {
1248 if PeekType(b) != Time {
1249 return nil, 0, 0, errors.Errorf("did not find marker")
1250 }
1251 b = b[1:]
1252 b, sec, err = DecodeVarintAscending(b)
1253 if err != nil {
1254 return b, 0, 0, err
1255 }
1256 b, nsec, err = DecodeVarintAscending(b)
1257 if err != nil {
1258 return b, 0, 0, err
1259 }
1260 return b, sec, nsec, nil
1261}
1262
1263// EncodeVoidAscendingOrDescending encodes a void (valid for both ascending and descending order).
1264func EncodeVoidAscendingOrDescending(b []byte) []byte {

Callers 2

DecodeTimeAscendingFunction · 0.85
DecodeTimeDescendingFunction · 0.85

Calls 3

PeekTypeFunction · 0.85
DecodeVarintAscendingFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…