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

Function DecodeUntaggedDecimalValue

postgres/parser/encoding/encoding.go:939–947  ·  view source on GitHub ↗

DecodeUntaggedDecimalValue decodes a value encoded by EncodeUntaggedDecimalValue.

(b []byte)

Source from the content-addressed store, hash-verified

937
938// DecodeUntaggedDecimalValue decodes a value encoded by EncodeUntaggedDecimalValue.
939func DecodeUntaggedDecimalValue(b []byte) (remaining []byte, d apd.Decimal, err error) {
940 var i uint64
941 b, _, i, err = DecodeNonsortingStdlibUvarint(b)
942 if err != nil {
943 return b, apd.Decimal{}, err
944 }
945 d, err = DecodeNonsortingDecimal(b[:int(i)], nil)
946 return b[int(i):], d, err
947}
948
949const uuidValueEncodedLength = 16
950

Callers 1

decodeJSONNumberFunction · 0.92

Calls 2

DecodeNonsortingDecimalFunction · 0.85

Tested by

no test coverage detected