Routine routine =
routineSchema.getSpecificRoutine(arguments.length);
compileContext.addProcedureCall(routine);
HsqlList unresolved = null;
for (int i = 0; i < arguments.length; i++) {
Expression e = arguments[i];
if (e.isUnresolvedParam()) {
e.setAttributesAsColumn(
routine.getParameter(i),
routine.getParameter(i).isWriteable());
} else {
int paramMode =
routine.getParameter(i).getParameterMode();
unresolved =
arguments[i].resolveColumnReferences(session,
outerRanges, unresolved);
if (paramMode
!= SchemaObject.ParameterModes.PARAM_IN) {
if (e.getType() != OpTypes.VARIABLE) {
throw Error.error(ErrorCode.X_42603);
}
}
}
}
ExpressionColumn.checkColumnsResolved(unresolved);
for (int i = 0; i < arguments.length; i++) {
arguments[i].resolveTypes(session, null);
if (!routine.getParameter(
i).getDataType().canBeAssignedFrom(
arguments[i].getDataType())) {
throw Error.error(ErrorCode.X_42561);
}
}
StatementDMQL cs = new StatementProcedure(session, routine,
arguments, compileContext);
return cs;
}
}
if (isStrictlyProcedure) {
throw Error.error(ErrorCode.X_42501, token.tokenString);
}
Expression expression = this.XreadValueExpression();
HsqlList unresolved = expression.resolveColumnReferences(session,
outerRanges, null);
ExpressionColumn.checkColumnsResolved(unresolved);
expression.resolveTypes(session, null);