From 81b6afad9b0c1402494dff302b9cae903bea65fa Mon Sep 17 00:00:00 2001 From: sophistik Date: Mon, 25 Oct 2021 23:53:06 +0300 Subject: [PATCH] method Ptr() --- decimal.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/decimal.go b/decimal.go index c614ea7..af7da4f 100644 --- a/decimal.go +++ b/decimal.go @@ -1424,6 +1424,11 @@ func (d Decimal) Value() (driver.Value, error) { return d.String(), nil } +// Decimal returns a pointer to struct +func (d Decimal) Ptr() *Decimal { + return &d +} + // UnmarshalText implements the encoding.TextUnmarshaler interface for XML // deserialization. func (d *Decimal) UnmarshalText(text []byte) error {