MCPcopy Create free account
hub / github.com/dolthub/doltgresql / PutUint32Ascending

Function PutUint32Ascending

postgres/parser/encoding/encoding.go:141–150  ·  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

139// representation at the specified index, lengthening the input slice if
140// necessary.
141func PutUint32Ascending(b []byte, v uint32, idx int) []byte {
142 for len(b) < idx+4 {
143 b = append(b, 0)
144 }
145 b[idx] = byte(v >> 24)
146 b[idx+1] = byte(v >> 16)
147 b[idx+2] = byte(v >> 8)
148 b[idx+3] = byte(v)
149 return b
150}
151
152// DecodeUint32Ascending decodes a uint32 from the input buffer, treating
153// the input as a big-endian 4 byte uint32 representation. The remainder

Callers 3

encodeMethod · 0.92
encodeMethod · 0.92
EncodeJSONFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected