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