blob: 1982e163ac01b19be29d4be9c484008e2f327aee [file] [log] [blame]
package groovy.sql;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* @author rfuller
*
* Represents a ResultSet retrieved as a callable statement out parameter.
*/
class CallResultSet extends GroovyResultSet {
int indx;
CallableStatement call;
ResultSet resultSet;
boolean firstCall = true;
CallResultSet(CallableStatement call, int indx){
this.call = call;
this.indx = indx;
}
protected ResultSet getResultSet() throws SQLException{
if(firstCall){
resultSet = (ResultSet) call.getObject(indx+1);
firstCall = false;
}
return resultSet;
}
}