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

Function DecodeUntaggedDecimalValue

pkg/util/encoding/encoding.go:2192–2200  ·  view source on GitHub ↗

DecodeUntaggedDecimalValue decodes a value encoded by EncodeUntaggedDecimalValue.

(b []byte)

Source from the content-addressed store, hash-verified

2190
2191// DecodeUntaggedDecimalValue decodes a value encoded by EncodeUntaggedDecimalValue.
2192func DecodeUntaggedDecimalValue(b []byte) (remaining []byte, d apd.Decimal, err error) {
2193 var i uint64
2194 b, _, i, err = DecodeNonsortingStdlibUvarint(b)
2195 if err != nil {
2196 return b, apd.Decimal{}, err
2197 }
2198 d, err = DecodeNonsortingDecimal(b[:int(i)], nil)
2199 return b[int(i):], d, err
2200}
2201
2202// DecodeIntoUntaggedDecimalValue is like DecodeUntaggedDecimalValue except it
2203// writes the new Decimal into the input apd.Decimal pointer, which must be

Callers 2

decodeJSONNumberFunction · 0.92
DecodeDecimalValueFunction · 0.85

Calls 2

DecodeNonsortingDecimalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…