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

Function ParseDInt

pkg/sql/sem/tree/datum.go:615–621  ·  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

613// ParseDInt parses and returns the *DInt Datum value represented by the provided
614// string, or an error if parsing is unsuccessful.
615func ParseDInt(s string) (*DInt, error) {
616 i, err := strconv.ParseInt(s, 0, 64)
617 if err != nil {
618 return nil, makeParseError(s, types.Int, err)
619 }
620 return NewDInt(DInt(i)), nil
621}
622
623// AsDInt attempts to retrieve a DInt from an Expr, returning a DInt and
624// a flag signifying whether the assertion was successful. The function should

Callers 2

ParseAndRequireStringFunction · 0.85
PerformCastFunction · 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…