ParseDInt parses and returns the *DInt Datum value represented by the provided string, or an error if parsing is unsuccessful.
(s string)
| 368 | // ParseDInt parses and returns the *DInt Datum value represented by the provided |
| 369 | // string, or an error if parsing is unsuccessful. |
| 370 | func ParseDInt(s string) (*DInt, error) { |
| 371 | i, err := strconv.ParseInt(s, 0, 64) |
| 372 | if err != nil { |
| 373 | return nil, makeParseError(s, types.Int, err) |
| 374 | } |
| 375 | return NewDInt(DInt(i)), nil |
| 376 | } |
| 377 | |
| 378 | // ResolvedType implements the TypedExpr interface. |
| 379 | func (*DInt) ResolvedType() *types.T { |
no test coverage detected