use of org.jooq.impl.DefaultConfiguration in project waltz by khartec.
the class DIBaseConfiguration method dsl.
@Bean
@Autowired
public DSLContext dsl(DataSource dataSource) {
try {
SQLDialect.valueOf(dialect);
} catch (IllegalArgumentException iae) {
System.err.println("Cannot parse sql dialect: " + dialect);
throw iae;
}
// TODO: remove sql server setting, see #4553
Settings dslSettings = new Settings().withRenderOutputForSQLServerReturningClause(false);
if ("true".equals(System.getProperty(JOOQ_DEBUG_PROPERTY))) {
dslSettings.withRenderFormatted(true).withExecuteLogging(true);
}
org.jooq.Configuration configuration = new DefaultConfiguration().set(dataSource).set(SQLDialect.valueOf(dialect)).set(dslSettings).set(new SlowQueryListener(databasePerformanceQuerySlowThreshold)).set(new SpringExceptionTranslationExecuteListener(new SQLStateSQLExceptionTranslator()));
return DSL.using(configuration);
}
use of org.jooq.impl.DefaultConfiguration in project commons-dao by reportportal.
the class DatabaseConfiguration method configuration.
@Bean
public DefaultConfiguration configuration() {
DefaultConfiguration jooqConfiguration = new DefaultConfiguration();
jooqConfiguration.set(SQLDialect.POSTGRES);
jooqConfiguration.setConnectionProvider(connectionProvider());
return jooqConfiguration;
}
Aggregations