public void setAutoCommit(boolean ac) throws SQLException { if (ac && intrans && db != null) { try { db.exec("ROLLBACK", null); } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } finally { intrans = false; } } autocommit = ac; }
public void commit() throws SQLException { if (db == null) { throw new SQLException("stale connection"); } if (!intrans) { return; } try { db.exec("COMMIT", null); intrans = false; } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } }
public void rollback() throws SQLException { if (db == null) { throw new SQLException("stale connection"); } if (!intrans) { return; } try { db.exec("ROLLBACK", null); intrans = false; } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } }
public void close() throws SQLException { try { rollback(); } catch (SQLException e) { /* ignored */ } intrans = false; if (db != null) { try { db.close(); db = null; } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } } }
public void setReadOnly(boolean ro) throws SQLException { if (intrans) { throw new SQLException("incomplete transaction"); } if (ro != readonly) { DatabaseX dbx = null; try { dbx = open(ro); db.close(); db = dbx; dbx = null; readonly = ro; } catch (SQLException e) { throw e; } catch (SQLite.Exception ee) { if (dbx != null) { try { dbx.close(); } catch (SQLite.Exception eee) { } } throw new SQLException(ee.toString()); } } }
throw new SQLException(e.toString());
public void setAutoCommit(boolean ac) throws SQLException { if (ac && intrans && db != null) { try { db.exec("ROLLBACK", null); } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } finally { intrans = false; } } autocommit = ac; }
public void setAutoCommit(boolean ac) throws SQLException { if (ac && intrans && db != null) { try { db.exec("ROLLBACK", null); } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } finally { intrans = false; } } autocommit = ac; }
public void setAutoCommit(boolean ac) throws SQLException { if (ac && intrans && db != null) { try { db.exec("ROLLBACK", null); } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } finally { intrans = false; } } autocommit = ac; }
public void setAutoCommit(boolean ac) throws SQLException { if (ac && intrans && db != null) { try { db.exec("ROLLBACK", null); } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } finally { intrans = false; } } autocommit = ac; }
public void setAutoCommit(boolean ac) throws SQLException { if (ac && intrans && db != null) { try { db.exec("ROLLBACK", null); } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } finally { intrans = false; } } autocommit = ac; }
public void setAutoCommit(boolean ac) throws SQLException { if (ac && intrans && db != null) { try { db.exec("ROLLBACK", null); } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } finally { intrans = false; } } autocommit = ac; }
public void commit() throws SQLException { if (db == null) { throw new SQLException("stale connection"); } if (!intrans) { return; } try { db.exec("COMMIT", null); intrans = false; } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } }
public void rollback() throws SQLException { if (db == null) { throw new SQLException("stale connection"); } if (!intrans) { return; } try { db.exec("ROLLBACK", null); intrans = false; } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } }
public void commit() throws SQLException { if (db == null) { throw new SQLException("stale connection"); } if (!intrans) { return; } try { db.exec("COMMIT", null); intrans = false; } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } }
public void commit() throws SQLException { if (db == null) { throw new SQLException("stale connection"); } if (!intrans) { return; } try { db.exec("COMMIT", null); intrans = false; } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } }
public void rollback() throws SQLException { if (db == null) { throw new SQLException("stale connection"); } if (!intrans) { return; } try { db.exec("ROLLBACK", null); intrans = false; } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } }
public void rollback() throws SQLException { if (db == null) { throw new SQLException("stale connection"); } if (!intrans) { return; } try { db.exec("ROLLBACK", null); intrans = false; } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } }
public void close() throws SQLException { try { rollback(); } catch (SQLException e) { /* ignored */ } intrans = false; if (db != null) { try { db.close(); db = null; } catch (SQLite.Exception e) { throw new SQLException(e.toString()); } } }