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

Function DecodeUint32Ascending

postgres/parser/encoding/encoding.go:155–161  ·  view source on GitHub ↗

DecodeUint32Ascending decodes a uint32 from the input buffer, treating the input as a big-endian 4 byte uint32 representation. The remainder of the input buffer and the decoded uint32 are returned.

(b []byte)

Source from the content-addressed store, hash-verified

153// the input as a big-endian 4 byte uint32 representation. The remainder
154// of the input buffer and the decoded uint32 are returned.
155func DecodeUint32Ascending(b []byte) ([]byte, uint32, error) {
156 if len(b) < 4 {
157 return nil, 0, errors.Errorf("insufficient bytes to decode uint32 int value")
158 }
159 v := binary.BigEndian.Uint32(b)
160 return b[4:], v, nil
161}
162
163// EncodeUint64Ascending encodes the uint64 value using a big-endian 8 byte
164// representation. The bytes are appended to the supplied buffer and

Callers 2

decodeJEntryFunction · 0.92
DecodeJSONFunction · 0.92

Calls 2

ErrorfMethod · 0.65
Uint32Method · 0.65

Tested by

no test coverage detected