use of org.dbflute.jdbc.StatementConfig in project dbflute-core by dbflute.
the class OutsideSqlAllFacadeExecutor method createStatementConfig.
protected StatementConfig createStatementConfig(StatementConfigCall<StatementConfig> configCall) {
if (configCall == null) {
throw new IllegalArgumentException("The argument 'confLambda' should not be null.");
}
final StatementConfig config = newStatementConfig();
configCall.callback(config);
return config;
}
use of org.dbflute.jdbc.StatementConfig in project dbflute-core by dbflute.
the class TnStatementFactoryImpl method getActualStatementConfig.
protected StatementConfig getActualStatementConfig(StatementConfig config) {
final StatementConfig defaultConfig = getActualDefaultConfig(config);
final Integer queryTimeout = getActualQueryTimeout(config, defaultConfig);
final Integer fetchSize = getActualFetchSize(config, defaultConfig);
final Integer maxRows = getActualMaxRows(config, defaultConfig);
if (queryTimeout == null && fetchSize == null && maxRows == null) {
return null;
}
final StatementConfig actualConfig = new StatementConfig();
actualConfig.queryTimeout(queryTimeout).fetchSize(fetchSize).maxRows(maxRows);
return actualConfig;
}
use of org.dbflute.jdbc.StatementConfig in project dbflute-core by dbflute.
the class TnStatementFactoryImpl method findStatementConfigOnThread.
// -----------------------------------------------------
// StatementConfig
// ---------------
protected StatementConfig findStatementConfigOnThread() {
final StatementConfig config;
if (ConditionBeanContext.isExistConditionBeanOnThread()) {
final ConditionBean cb = ConditionBeanContext.getConditionBeanOnThread();
config = cb.getStatementConfig();
} else if (OutsideSqlContext.isExistOutsideSqlContextOnThread()) {
final OutsideSqlContext context = OutsideSqlContext.getOutsideSqlContextOnThread();
config = context.getStatementConfig();
} else {
// update or no exist
config = InternalMapContext.getUpdateStatementConfig();
}
return config;
}
use of org.dbflute.jdbc.StatementConfig in project dbflute-core by dbflute.
the class InsertOption method createStatementConfig.
protected StatementConfig createStatementConfig(StatementConfigCall<StatementConfig> configCall) {
if (configCall == null) {
throw new IllegalArgumentException("The argument 'confLambda' should not be null.");
}
final StatementConfig config = newStatementConfig();
configCall.callback(config);
return config;
}
use of org.dbflute.jdbc.StatementConfig in project dbflute-core by dbflute.
the class TnStatementFactoryImplTest method test_getActualStatementConfig_cursorSelectFetchSize_notCursor_plain.
public void test_getActualStatementConfig_cursorSelectFetchSize_notCursor_plain() throws Exception {
// ## Arrange ##
TnStatementFactoryImpl impl = new TnStatementFactoryImpl() {
@Override
protected boolean isSelectCursorFetchSizeCommand(BehaviorCommand<?> command) {
return false;
}
};
impl.setCursorSelectFetchSize(200);
// ## Act ##
StatementConfig actual = impl.getActualStatementConfig(null);
// ## Assert ##
assertNull(actual);
}
Aggregations