final BigdataSailConnection cnxn = sail.getConnection();
/** * Test creates a database, obtains a writable connection on the database, * and then closes the connection and shutdown the database. * * @throws SailException */ public void test_getConnection() throws SailException { final Properties properties = new Properties(); properties.setProperty(Options.CREATE_TEMP_FILE, "true"); final BigdataSail sail = new BigdataSail(properties); try { sail.initialize(); final SailConnection conn = sail.getConnection(); conn.close(); sail.shutDown(); } finally { sail.getIndexManager().destroy(); } }
boolean ok = false; try { con = sail.getConnection(); final boolean isQuads = con.isQuads(); for (int i = 0; i < nwrites; i++) {
getSail().getConnection());
getSail().getConnection());
final BigdataSailConnection cnxn = sail.getConnection();
/** * Unit test verifies that the history index is not created if the option is * not enabled. */ public void test_historyIndexDisabled() throws SailException { final Properties properties = getProperties(); // disable the history service. properties .setProperty( com.bigdata.rdf.store.AbstractTripleStore.Options.HISTORY_SERVICE, "false"); final BigdataSail sail = getSail(properties); try { sail.initialize(); final BigdataSailConnection conn = sail.getConnection(); try { // Resolve the index that the connection will write on. final IIndex ndx = getHistoryIndex(conn.getTripleStore()); // The index should not exist. assertNull(ndx); conn.rollback(); } finally { conn.close(); } } finally { sail.__tearDownUnitTest(); } }
/** * Test creates a database, obtains a writable connection on the database, * and then closes the connection and shutdown the database. * * @throws SailException */ public void test_getConnection() throws SailException { final Properties properties = new Properties(); properties.setProperty(Options.CREATE_TEMP_FILE, "true"); final BigdataSail sail = new BigdataSail(properties); try { sail.initialize(); final SailConnection conn = sail.getConnection(); conn.close(); sail.shutDown(); } finally { sail.getIndexManager().destroy(); } }
boolean ok = false; try { con = sail.getConnection(); final boolean isQuads = con.isQuads(); for (int i = 0; i < nwrites; i++) {
final BigdataSailConnection con = tempSail.getConnection();
/** * Unit test verifies that the history index is not created if the option is * not enabled. */ public void test_historyIndexDisabled() throws SailException { final Properties properties = getProperties(); // disable the history service. properties .setProperty( com.bigdata.rdf.store.AbstractTripleStore.Options.HISTORY_SERVICE, "false"); final BigdataSail sail = getSail(properties); try { sail.initialize(); final BigdataSailConnection conn = sail.getConnection(); try { // Resolve the index that the connection will write on. final IIndex ndx = getHistoryIndex(conn.getTripleStore()); // The index should not exist. assertNull(ndx); conn.rollback(); } finally { conn.close(); } } finally { sail.__tearDownUnitTest(); } }
final BigdataSailConnection con = tempSail.getConnection();