td.getScale(),
td.isNullable(),
td.getMaximumWidth()
);
signature[p] = new JSQLType(methoddtd);
// this is the SQL type of the procedure parameter.
DataTypeDescriptor paramdtd = new DataTypeDescriptor(
parameterTypeId,
td.getPrecision(),
td.getScale(),
td.isNullable(),
td.getMaximumWidth()
);
//
// Now coerce the actual method parameter to the declared type
// of this routine arg.
//
// if this is the last argument of a varargs routine...
if ( hasVarargs && (p == parameterCount-1) )
{
//
// The invocation of a varargs routine may have more actual parameters
// than the number of declared routine arguments. All of the trailing
// parameters must be coercible to the type of the last declared argument.
// Furthermore, it may turn out that there isn't a parameter corresponding to the last
// declared argument of the varargs routine.
//
for ( int idx = p; idx < methodParms.length; idx++ )
{
coerceMethodParameter
(
fromList, subqueryList, aggregateVector,
rai,
methodParms.length,
paramdtd, parameterTypeId, parameterMode,
idx
);
}
}
else // NOT the last argument of a varargs routine
{
coerceMethodParameter
(
fromList, subqueryList, aggregateVector,
rai,
methodParms.length,
paramdtd, parameterTypeId, parameterMode,
p
);
}
}
if (sigParameterCount != parameterCount) {
DataTypeDescriptor dtd = new DataTypeDescriptor(
TypeId.getUserDefinedTypeId("java.sql.ResultSet[]"),
0,
0,
false,
-1
);
signature[parameterCount] = new JSQLType(dtd);
}
this.routineInfo = rai;
ad = proc;