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

Function ParseDFloat

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

ParseDFloat parses and returns the *DFloat Datum value represented by the provided string, or an error if parsing is unsuccessful.

(s string)

Source from the content-addressed store, hash-verified

837// ParseDFloat parses and returns the *DFloat Datum value represented by the provided
838// string, or an error if parsing is unsuccessful.
839func ParseDFloat(s string) (*DFloat, error) {
840 f, err := strconv.ParseFloat(s, 64)
841 if err != nil {
842 return nil, MakeParseError(s, types.Float, err)
843 }
844 return NewDFloat(DFloat(f)), nil
845}
846
847// ResolvedType implements the TypedExpr interface.
848func (*DFloat) ResolvedType() *types.T {

Callers 1

ParseAndRequireStringFunction · 0.85

Calls 3

MakeParseErrorFunction · 0.85
NewDFloatFunction · 0.85
DFloatTypeAlias · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…