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

Function DecodeNonsortingDecimal

postgres/parser/encoding/decimal.go:632–636  ·  view source on GitHub ↗

DecodeNonsortingDecimal returns the decoded decimal from buf encoded with EncodeNonsortingDecimal. buf is assumed to contain only the encoded decimal, as the function does not know from the encoding itself what the length of the encoded value is.

(buf []byte, tmp []byte)

Source from the content-addressed store, hash-verified

630// as the function does not know from the encoding itself what the length
631// of the encoded value is.
632func DecodeNonsortingDecimal(buf []byte, tmp []byte) (apd.Decimal, error) {
633 var dec apd.Decimal
634 err := DecodeIntoNonsortingDecimal(&dec, buf, tmp)
635 return dec, err
636}
637
638// DecodeIntoNonsortingDecimal is like DecodeNonsortingDecimal, but it operates
639// on the passed-in *apd.Decimal instead of producing a new one.

Callers 1

Calls 1

Tested by

no test coverage detected