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

Function DecodeTimeAscending

pkg/util/encoding/encoding.go:919–925  ·  view source on GitHub ↗

DecodeTimeAscending decodes a time.Time value which was encoded using EncodeTime. The remainder of the input buffer and the decoded time.Time are returned.

(b []byte)

Source from the content-addressed store, hash-verified

917// EncodeTime. The remainder of the input buffer and the decoded
918// time.Time are returned.
919func DecodeTimeAscending(b []byte) ([]byte, time.Time, error) {
920 b, sec, nsec, err := decodeTime(b)
921 if err != nil {
922 return b, time.Time{}, err
923 }
924 return b, timeutil.Unix(sec, nsec), nil
925}
926
927// DecodeTimeDescending is the descending version of DecodeTimeAscending.
928func DecodeTimeDescending(b []byte) ([]byte, time.Time, error) {

Callers 1

prettyPrintFirstValueFunction · 0.85

Calls 2

UnixFunction · 0.92
decodeTimeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…