@Before public void before() { JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL"); this.dbi = new DBI(ds); this.jsondb = new SqlJsonDB(dbi, null); try { this.jsondb.dropTables(); } catch (Exception e) { } this.jsondb.createTables(); }
@Before public void before() { JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL"); DBI dbi = new DBI(ds); this.jsondb = new SqlJsonDB(dbi, null, Arrays.asList(new Index("/pair", "key")) ); try { this.jsondb.dropTables(); } catch (Exception e) { } this.jsondb.createTables(); }
@Before public void before() { JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL"); this.dbi = new DBI(ds); this.jsondb = new SqlJsonDB(dbi, null); try { this.jsondb.dropTables(); } catch (Exception e) { } this.jsondb.createTables(); }
@Before public void before() { JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:/tmp/test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL"); DBI dbi = new DBI(ds); this.jsondb = new SqlJsonDB(dbi, null, Arrays.asList( new Index("/pair", "key"), new Index("/users", "name"), new Index("/users", "age") ) ); try { this.jsondb.dropTables(); } catch (Exception e) { } this.jsondb.createTables(); }
@Before public void before() throws IOException, ParseException { JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL"); DBI dbi = new DBI(ds); this.jsondb = new SqlJsonDB(dbi, null, Arrays.asList(new Index("/pair", "key")) ); try { this.jsondb.dropTables(); } catch (Exception e) { } this.jsondb.createTables(); jsondbRM = new JsonDBRawMetrics(jsondb); load(); CacheManager cacheManager = new LRUCacheManager(100); EncryptionComponent encryptionComponent = new EncryptionComponent(null); ResourceLoader resourceLoader = new DefaultResourceLoader(); //Create Data Manager dataManager = new DataManager(cacheManager, Collections.emptyList(), null, encryptionComponent, resourceLoader); intMH = new IntegrationMetricsHandler(dataManager); }