ParseReturnExpr handles reading and parsing the expression for a RETURN or RETURN NEXT statement, which can be nonexistent.
()
| 380 | // ParseReturnExpr handles reading and parsing the expression for a RETURN or |
| 381 | // RETURN NEXT statement, which can be nonexistent. |
| 382 | func (l *lexer) ParseReturnExpr() (plpgsqltree.Expr, error) { |
| 383 | startPos, endPos, _, err := l.readSQLConstruct(true /* isExpr */, true /* allowEmpty */, ';') |
| 384 | if err != nil || startPos == endPos { |
| 385 | return nil, err |
| 386 | } |
| 387 | exprStr := l.getStr(startPos, endPos) |
| 388 | return l.ParseExpr(exprStr) |
| 389 | } |
| 390 | |
| 391 | // ParseReturnQuery handles reading and parsing the query for a RETURN QUERY |
| 392 | // statement, which can be nonexistent. |
no test coverage detected