ParseExpr is a short-hand for parseExprs([]string{sql})
(sql string)
| 363 | |
| 364 | // ParseExpr is a short-hand for parseExprs([]string{sql}) |
| 365 | func ParseExpr(sql string) (tree.Expr, error) { |
| 366 | exprs, err := parseExprs([]string{sql}) |
| 367 | if err != nil { |
| 368 | return nil, err |
| 369 | } |
| 370 | if len(exprs) != 1 { |
| 371 | return nil, errors.AssertionFailedf("expected 1 expression, found %d", len(exprs)) |
| 372 | } |
| 373 | return exprs[0], nil |
| 374 | } |
| 375 | |
| 376 | // ParseType parses a column type. |
| 377 | func ParseType(sql string) (tree.ResolvableTypeReference, error) { |
no test coverage detected