use of org.dbflute.s2dao.jdbc.TnFetchAssistResultSet in project dbflute-core by dbflute.
the class TnBasicSelectHandler method doQueryResult.
protected ResultSet doQueryResult(PreparedStatement ps) throws SQLException {
// /- - - - - - - - - - - - - - - - - - - - - - - - - - -
// All select statements on DBFlute use this result set.
// - - - - - - - - - -/
final ResultSet rs = executeQuery(ps);
if (!isUseFunctionalResultSet()) {
return rs;
}
if (isInternalDebugEnabled()) {
_log.debug("...Wrapping result set by functional one");
}
final FetchBean selbean = FetchAssistContext.getFetchBeanOnThread();
final TnFetchAssistResultSet wrapper;
if (OutsideSqlContext.isExistOutsideSqlContextOnThread()) {
final OutsideSqlContext context = OutsideSqlContext.getOutsideSqlContextOnThread();
final boolean offsetByCursorForcedly = context.isOffsetByCursorForcedly();
final boolean limitByCursorForcedly = context.isLimitByCursorForcedly();
wrapper = createFunctionalResultSet(rs, selbean, offsetByCursorForcedly, limitByCursorForcedly);
} else {
wrapper = createFunctionalResultSet(rs, selbean, false, false);
}
return wrapper;
}
use of org.dbflute.s2dao.jdbc.TnFetchAssistResultSet in project dbflute-core by dbflute.
the class TnProcedureHandler method wrapResultSetIfNeeds.
protected ResultSet wrapResultSetIfNeeds(Object pmb, ResultSet rs) {
if (pmb instanceof FetchBean) {
final FetchBean fcbean = (FetchBean) pmb;
final int safetyMaxResultSize = fcbean.getSafetyMaxResultSize();
if (safetyMaxResultSize > 0) {
// wrap for check safety
return new TnFetchAssistResultSet(rs, fcbean, false, false);
}
}
return rs;
}
Aggregations