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

Function decodeTimeTZ

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

Source from the content-addressed store, hash-verified

1485}
1486
1487func decodeTimeTZ(b []byte) ([]byte, int64, int32, error) {
1488 if PeekType(b) != TimeTZ {
1489 return nil, 0, 0, errors.Errorf("did not find marker")
1490 }
1491 b = b[1:]
1492 var err error
1493 var unixMicros int64
1494 b, unixMicros, err = DecodeVarintAscending(b)
1495 if err != nil {
1496 return nil, 0, 0, err
1497 }
1498 var offsetSecs int64
1499 b, offsetSecs, err = DecodeVarintAscending(b)
1500 if err != nil {
1501 return nil, 0, 0, err
1502 }
1503 return b, unixMicros, int32(offsetSecs), nil
1504}
1505
1506// EncodeDurationAscending encodes a duration.Duration value, appends it to the
1507// supplied buffer, and returns the final buffer. The encoding is guaranteed to

Callers 2

DecodeTimeTZAscendingFunction · 0.85
DecodeTimeTZDescendingFunction · 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…