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

Function EncodeDecimalAscending

pkg/util/encoding/decimal.go:45–47  ·  view source on GitHub ↗

EncodeDecimalAscending returns the resulting byte slice with the encoded decimal appended to the given buffer. Values are classified as large, medium, or small according to the value of E. If E is 11 or more, the value is large. For E between 0 and 10, the value is medium. For E less than zero, the

(appendTo []byte, d *apd.Decimal)

Source from the content-addressed store, hash-verified

43// consist of the single byte 0x1a followed by a descending varint encoding of
44// E followed by the ones-complement of M.
45func EncodeDecimalAscending(appendTo []byte, d *apd.Decimal) []byte {
46 return encodeDecimal(appendTo, d, false)
47}
48
49// EncodeDecimalDescending is the descending version of EncodeDecimalAscending.
50func EncodeDecimalDescending(appendTo []byte, d *apd.Decimal) []byte {

Callers 1

Calls 1

encodeDecimalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…