Numeric creates a numeric value from a string.
(str string)
| 239 | |
| 240 | // Numeric creates a numeric value from a string. |
| 241 | func Numeric(str string) pgtype.Numeric { |
| 242 | numeric := pgtype.Numeric{} |
| 243 | if err := numeric.Scan(str); err != nil { |
| 244 | panic(err) |
| 245 | } |
| 246 | return numeric |
| 247 | } |
| 248 | |
| 249 | // NumericToDecimal converts a pgtype.Numeric value to a apd.Decimal value. |
| 250 | func NumericToDecimal(val pgtype.Numeric) *apd.Decimal { |
no test coverage detected