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

Method AsDecimal

pkg/util/json/encoded.go:557–567  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

555}
556
557func (j *jsonEncoded) AsDecimal() (*apd.Decimal, bool) {
558 if dec := j.alreadyDecoded(); dec != nil {
559 return dec.AsDecimal()
560 }
561
562 decoded, err := j.decode()
563 if err != nil {
564 return nil, false
565 }
566 return decoded.AsDecimal()
567}
568
569func (j *jsonEncoded) AsBool() (bool, bool) {
570 if dec := j.alreadyDecoded(); dec != nil {

Callers

nothing calls this directly

Calls 3

alreadyDecodedMethod · 0.95
decodeMethod · 0.95
AsDecimalMethod · 0.65

Tested by

no test coverage detected