Search in sources :

Example 1 with EmptyEntityCache

use of io.requery.cache.EmptyEntityCache in project requery by requery.

the class TimeConversionsTest method setup.

@Before
public void setup() throws SQLException {
    Platform platform = new HSQL();
    CommonDataSource dataSource = DatabaseType.getDataSource(platform);
    EntityModel model = Models.MODEL2;
    Configuration configuration = new ConfigurationBuilder(dataSource, model).useDefaultLogging().setEntityCache(new EmptyEntityCache()).setWriteExecutor(Executors.newSingleThreadExecutor()).build();
    SchemaModifier tables = new SchemaModifier(configuration);
    tables.createTables(TableCreationMode.DROP_CREATE);
    data = new EntityDataStore<>(configuration);
}
Also used : ConfigurationBuilder(io.requery.sql.ConfigurationBuilder) Platform(io.requery.sql.Platform) Configuration(io.requery.sql.Configuration) EmptyEntityCache(io.requery.cache.EmptyEntityCache) HSQL(io.requery.sql.platform.HSQL) EntityModel(io.requery.meta.EntityModel) CommonDataSource(javax.sql.CommonDataSource) SchemaModifier(io.requery.sql.SchemaModifier) Before(org.junit.Before)

Example 2 with EmptyEntityCache

use of io.requery.cache.EmptyEntityCache in project requery by requery.

the class StatelessTest method setup.

@Before
public void setup() throws SQLException {
    CommonDataSource dataSource = DatabaseType.getDataSource(platform);
    EntityModel model = Models.STATELESS;
    Configuration configuration = new ConfigurationBuilder(dataSource, model).useDefaultLogging().setEntityCache(new EmptyEntityCache()).setWriteExecutor(Executors.newSingleThreadExecutor()).build();
    SchemaModifier tables = new SchemaModifier(configuration);
    tables.createTables(TableCreationMode.DROP_CREATE);
    System.out.println(tables.createTablesString(TableCreationMode.DROP_CREATE));
    data = new EntityDataStore<>(configuration);
}
Also used : ConfigurationBuilder(io.requery.sql.ConfigurationBuilder) Configuration(io.requery.sql.Configuration) EmptyEntityCache(io.requery.cache.EmptyEntityCache) EntityModel(io.requery.meta.EntityModel) CommonDataSource(javax.sql.CommonDataSource) SchemaModifier(io.requery.sql.SchemaModifier) Before(org.junit.Before)

Example 3 with EmptyEntityCache

use of io.requery.cache.EmptyEntityCache in project requery by requery.

the class UpsertTest method setup.

@Before
public void setup() throws SQLException {
    CommonDataSource dataSource = DatabaseType.getDataSource(platform);
    EntityModel model = Models.MODEL3;
    Configuration configuration = new ConfigurationBuilder(dataSource, model).useDefaultLogging().setEntityCache(new EmptyEntityCache()).setWriteExecutor(Executors.newSingleThreadExecutor()).build();
    SchemaModifier tables = new SchemaModifier(configuration);
    tables.createTables(TableCreationMode.DROP_CREATE);
    System.out.println(tables.createTablesString(TableCreationMode.DROP_CREATE));
    data = new EntityDataStore<>(configuration);
}
Also used : ConfigurationBuilder(io.requery.sql.ConfigurationBuilder) Configuration(io.requery.sql.Configuration) EmptyEntityCache(io.requery.cache.EmptyEntityCache) EntityModel(io.requery.meta.EntityModel) CommonDataSource(javax.sql.CommonDataSource) SchemaModifier(io.requery.sql.SchemaModifier) Before(org.junit.Before)

Aggregations

EmptyEntityCache (io.requery.cache.EmptyEntityCache)3 EntityModel (io.requery.meta.EntityModel)3 Configuration (io.requery.sql.Configuration)3 ConfigurationBuilder (io.requery.sql.ConfigurationBuilder)3 SchemaModifier (io.requery.sql.SchemaModifier)3 CommonDataSource (javax.sql.CommonDataSource)3 Before (org.junit.Before)3 Platform (io.requery.sql.Platform)1 HSQL (io.requery.sql.platform.HSQL)1