MCPcopy Create free account
hub / github.com/cockroachdb/apd / MarshalText

Method MarshalText

decimal.go:800–805  ·  view source on GitHub ↗

MarshalText implements the encoding.TextMarshaler interface.

()

Source from the content-addressed store, hash-verified

798
799// MarshalText implements the encoding.TextMarshaler interface.
800func (d *Decimal) MarshalText() ([]byte, error) {
801 if d == nil {
802 return []byte("<nil>"), nil
803 }
804 return []byte(d.String()), nil
805}
806
807// NullDecimal represents a string that may be null. NullDecimal implements
808// the database/sql.Scanner interface so it can be used as a scan destination:

Callers

nothing calls this directly

Calls 1

StringMethod · 0.95

Tested by

no test coverage detected