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

Function ParseDInt

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

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

(s string)

Source from the content-addressed store, hash-verified

669// ParseDInt parses and returns the *DInt Datum value represented by the provided
670// string, or an error if parsing is unsuccessful.
671func ParseDInt(s string) (*DInt, error) {
672 i, err := strconv.ParseInt(s, 0, 64)
673 if err != nil {
674 return nil, MakeParseError(s, types.Int, err)
675 }
676 return NewDInt(DInt(i)), nil
677}
678
679// AsDInt attempts to retrieve a DInt from an Expr, returning a DInt and
680// a flag signifying whether the assertion was successful. The function should

Callers 2

InferTypesFunction · 0.85
ParseAndRequireStringFunction · 0.85

Calls 3

MakeParseErrorFunction · 0.85
NewDIntFunction · 0.85
DIntTypeAlias · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…