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

Function EncodeTimeAscending

pkg/util/encoding/encoding.go:1209–1211  ·  view source on GitHub ↗

EncodeTimeAscending encodes a time value, appends it to the supplied buffer, and returns the final buffer. The encoding is guaranteed to be ordered Such that if t1.Before(t2) then after EncodeTime(b1, t1), and EncodeTime(b2, t2), Compare(b1, b2) < 0. The time zone offset not included in the encoding

(b []byte, t time.Time)

Source from the content-addressed store, hash-verified

1207// EncodeTime(b2, t2), Compare(b1, b2) < 0. The time zone offset not
1208// included in the encoding.
1209func EncodeTimeAscending(b []byte, t time.Time) []byte {
1210 return encodeTime(b, t.Unix(), int64(t.Nanosecond()))
1211}
1212
1213// EncodeTimeDescending is the descending version of EncodeTimeAscending.
1214func EncodeTimeDescending(b []byte, t time.Time) []byte {

Callers

nothing calls this directly

Calls 1

encodeTimeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…