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

Method SetString

pkg/sql/sem/tree/datum.go:1033–1035  ·  view source on GitHub ↗

SetString sets d to s. Any non-standard NaN values are converted to a normal NaN. Any negative zero is converted to positive.

(s string)

Source from the content-addressed store, hash-verified

1031// SetString sets d to s. Any non-standard NaN values are converted to a
1032// normal NaN. Any negative zero is converted to positive.
1033func (d *DDecimal) SetString(s string) error {
1034 return setDecimalString(s, &d.Decimal)
1035}
1036
1037func setDecimalString(s string, d *apd.Decimal) error {
1038 // ExactCtx should be able to handle any decimal, but if there is any rounding

Callers 5

ParseDDecimalFunction · 0.95
setDecimalStringFunction · 0.80
ResolveAsTypeMethod · 0.80
makeDecimalFromMandEFunction · 0.80
FromNumberFunction · 0.80

Calls 1

setDecimalStringFunction · 0.85

Tested by

no test coverage detected