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

Function decodeTime

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

Source from the content-addressed store, hash-verified

934}
935
936func decodeTime(b []byte) (r []byte, sec int64, nsec int64, err error) {
937 if PeekType(b) != Time {
938 return nil, 0, 0, errors.Errorf("did not find marker")
939 }
940 b = b[1:]
941 b, sec, err = DecodeVarintAscending(b)
942 if err != nil {
943 return b, 0, 0, err
944 }
945 b, nsec, err = DecodeVarintAscending(b)
946 if err != nil {
947 return b, 0, 0, err
948 }
949 return b, sec, nsec, nil
950}
951
952// EncodeTimeTZAscending encodes a timetz.TimeTZ value and appends it to
953// the supplied buffer and returns the final buffer.

Callers 2

DecodeTimeAscendingFunction · 0.85
DecodeTimeDescendingFunction · 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…