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

Function DecodeUntaggedDecimalValue

pkg/util/encoding/encoding.go:3073–3081  ·  view source on GitHub ↗

DecodeUntaggedDecimalValue decodes a value encoded by EncodeUntaggedDecimalValue.

(b []byte)

Source from the content-addressed store, hash-verified

3071
3072// DecodeUntaggedDecimalValue decodes a value encoded by EncodeUntaggedDecimalValue.
3073func DecodeUntaggedDecimalValue(b []byte) (remaining []byte, d apd.Decimal, err error) {
3074 var i uint64
3075 b, _, i, err = DecodeNonsortingStdlibUvarint(b)
3076 if err != nil {
3077 return b, apd.Decimal{}, err
3078 }
3079 d, err = DecodeNonsortingDecimal(b[:int(i)], nil)
3080 return b[int(i):], d, err
3081}
3082
3083// DecodeIntoUntaggedDecimalValue is like DecodeUntaggedDecimalValue except it
3084// 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…