ParseDInt parses and returns the *DInt Datum value represented by the provided string, or an error if parsing is unsuccessful.
(s string)
| 613 | // ParseDInt parses and returns the *DInt Datum value represented by the provided |
| 614 | // string, or an error if parsing is unsuccessful. |
| 615 | func 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 |
no test coverage detected
searching dependent graphs…