case CALL:
jj_consume_token(CALL);
value = primaryExpression();
if (! (value instanceof JavaToSQLValueNode) ||
! (((JavaToSQLValueNode) value).getJavaValueNode() instanceof MethodCallNode)) {
{if (true) throw new StandardException("Invalid call statement");}
}
StatementNode callStatement = (StatementNode)
nodeFactory.getNode(NodeTypes.CALL_STATEMENT_NODE,
value,
parserContext);
{if (true) return callStatement;}
break;
case QUESTION_MARK:
case DOLLAR_N:
// ? = CALL method()
returnParam = dynamicParameterSpecification();
jj_consume_token(EQUALS_OPERATOR);
jj_consume_token(CALL);
resultSetNode = rowValueConstructor(null);
// Validate that we have something that is an appropriate call statement.
ResultColumnList rcl = resultSetNode.getResultColumns();
// We can have only 1 return value/column.
if (rcl == null || rcl.size() > 1) {
{if (true) throw new StandardException("Invalid call statement");}
}
// We must have a method call node.
value = rcl.get(0).getExpression();
if (! (value instanceof JavaToSQLValueNode) ||
! (((JavaToSQLValueNode) value).getJavaValueNode() instanceof MethodCallNode)) {
{if (true) throw new StandardException("Invalid call statement");}
}
// wrap the row result set in a cursor node
StatementNode cursorNode = (StatementNode)
nodeFactory.getNode(NodeTypes.CURSOR_NODE,