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

Function PutUint32Ascending

pkg/util/encoding/encoding.go:145–154  ·  view source on GitHub ↗

PutUint32Ascending encodes the uint32 value using a big-endian 4 byte representation at the specified index, lengthening the input slice if necessary.

(b []byte, v uint32, idx int)

Source from the content-addressed store, hash-verified

143// representation at the specified index, lengthening the input slice if
144// necessary.
145func PutUint32Ascending(b []byte, v uint32, idx int) []byte {
146 for len(b) < idx+4 {
147 b = append(b, 0)
148 }
149 b[idx] = byte(v >> 24)
150 b[idx+1] = byte(v >> 16)
151 b[idx+2] = byte(v >> 8)
152 b[idx+3] = byte(v)
153 return b
154}
155
156// EncodeUint32Descending encodes the uint32 value so that it sorts in
157// reverse order, from largest to smallest.

Callers 3

encodeMethod · 0.92
encodeMethod · 0.92
EncodeJSONFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…