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

Function decodeTimeTZ

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

Source from the content-addressed store, hash-verified

1002}
1003
1004func decodeTimeTZ(b []byte) ([]byte, int64, int32, error) {
1005 if PeekType(b) != TimeTZ {
1006 return nil, 0, 0, errors.Errorf("did not find marker")
1007 }
1008 b = b[1:]
1009 var err error
1010 var unixMicros int64
1011 b, unixMicros, err = DecodeVarintAscending(b)
1012 if err != nil {
1013 return nil, 0, 0, err
1014 }
1015 var offsetSecs int64
1016 b, offsetSecs, err = DecodeVarintAscending(b)
1017 if err != nil {
1018 return nil, 0, 0, err
1019 }
1020 return b, unixMicros, int32(offsetSecs), nil
1021}
1022
1023// EncodeDurationAscending encodes a duration.Duration value, appends it to the
1024// supplied buffer, and returns the final buffer. The encoding is guaranteed to

Callers 2

DecodeTimeTZAscendingFunction · 0.85
DecodeTimeTZDescendingFunction · 0.85

Calls 2

PeekTypeFunction · 0.85
DecodeVarintAscendingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…