org.jooq.impl.DefaultDSLContext Java Examples

The following examples show how to use org.jooq.impl.DefaultDSLContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JooqContext.java    From titus-control-plane with Apache License 2.0 5 votes vote down vote up
public JooqContext(JooqConfiguration jooqConfiguration,
                   DataSource dataSource,
                   EmbeddedPostgresService embeddedPostgresService) {
    this.jooqConfiguration = jooqConfiguration;
    this.dataSource = dataSource;
    this.embeddedPostgresService = embeddedPostgresService;
    this.dslContext = new DefaultDSLContext(dataSource, DEFAULT_DIALECT);
}
 
Example #2
Source File: UserDataSources.java    From secrets-proxy with Apache License 2.0 5 votes vote down vote up
private DSLContext getDslContext(PlatformTransactionManager txManager, DataSource dataSource) {
  DefaultConfiguration config = new DefaultConfiguration();
  config.set(new DataSourceConnectionProvider(new TransactionAwareDataSourceProxy(dataSource)));
  config.set(new DefaultExecuteListenerProvider(new JooqExceptionTranslator()));
  config.set(new SpringTransactionProvider(txManager));
  return new DefaultDSLContext(config);
}
 
Example #3
Source File: JooqModule.java    From titus-control-plane with Apache License 2.0 4 votes vote down vote up
@Override
public DSLContext get() {
    return new DefaultDSLContext(connectionProvider, dialect);
}
 
Example #4
Source File: JooqResource.java    From titus-control-plane with Apache License 2.0 4 votes vote down vote up
@Override
protected void before() throws Throwable {
    this.connection = DriverManager.getConnection("jdbc:hsqldb:mem:junit" + System.currentTimeMillis(), "SA", "");
    this.dslContext = new DefaultDSLContext(new DefaultConnectionProvider(connection), SQLDialect.HSQLDB);
}
 
Example #5
Source File: JooqResource.java    From titus-control-plane with Apache License 2.0 4 votes vote down vote up
public DefaultDSLContext getDslContext() {
    return dslContext;
}
 
Example #6
Source File: JooqContext.java    From titus-control-plane with Apache License 2.0 4 votes vote down vote up
public DefaultDSLContext getDslContext() {
    return dslContext;
}
 
Example #7
Source File: CategoryConfiguration.java    From spring-data-examples with Apache License 2.0 4 votes vote down vote up
@Bean
DefaultDSLContext dsl() {
	return new DefaultDSLContext(configuration());
}
 
Example #8
Source File: AppConfig.java    From sequenceiq-samples with Apache License 2.0 4 votes vote down vote up
@Bean
public DefaultDSLContext createDefaultDSLContext() {
    return new DefaultDSLContext(dataSourceConnectionProvider(), SQLDialect.MYSQL);
}
 
Example #9
Source File: PersistenceContextIntegrationTest.java    From tutorials with MIT License 4 votes vote down vote up
@Bean
public DefaultDSLContext dsl() {
    return new DefaultDSLContext(configuration());
}
 
Example #10
Source File: InitialConfiguration.java    From tutorials with MIT License 4 votes vote down vote up
@Bean
public DefaultDSLContext dsl() {
    return new DefaultDSLContext(configuration());
}
 
Example #11
Source File: JooqConfigurationFactory.java    From micronaut-sql with Apache License 2.0 2 votes vote down vote up
/**
 * Created {@link DSLContext} based on {@link Configuration}.
 *
 * @param configuration The {@link Configuration}
 * @return A {@link DSLContext}
 */
@EachBean(Configuration.class)
public DSLContext dslContext(Configuration configuration) {
    return new DefaultDSLContext(configuration);
}