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

Function DecodeIntoUntaggedDecimalValue

pkg/util/encoding/encoding.go:2205–2213  ·  view source on GitHub ↗

DecodeIntoUntaggedDecimalValue is like DecodeUntaggedDecimalValue except it writes the new Decimal into the input apd.Decimal pointer, which must be non-nil.

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

Source from the content-addressed store, hash-verified

2203// writes the new Decimal into the input apd.Decimal pointer, which must be
2204// non-nil.
2205func DecodeIntoUntaggedDecimalValue(d *apd.Decimal, b []byte) (remaining []byte, err error) {
2206 var i uint64
2207 b, _, i, err = DecodeNonsortingStdlibUvarint(b)
2208 if err != nil {
2209 return b, err
2210 }
2211 err = DecodeIntoNonsortingDecimal(d, b[:int(i)], nil)
2212 return b[int(i):], err
2213}
2214
2215// DecodeDurationValue decodes a value encoded by EncodeUntaggedDurationValue.
2216func DecodeDurationValue(b []byte) (remaining []byte, d duration.Duration, err error) {

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…