/** * Clear all data, disposing the blob. May be called by SQLiteConnection on close. */ void clear() { myHandle = null; myController = SQLiteController.getDisposed(myController); Internal.logFine(this, "cleared"); }
/** * Constructs DISPOSED singleton */ private SQLiteStatement() { myController = SQLiteController.getDisposed(null); myHandle = null; mySqlParts = new SQLParts().fix(); myProfiler = null; }
/** * Clear all data, disposing the statement. May be called by SQLiteConnection on close. */ void clear() { clearBindStreams(false); clearColumnStreams(); myHandle = null; myHasRow = false; myColumnCount = -1; myHasBindings = false; myStepped = false; myController = SQLiteController.getDisposed(myController); myProfiler = null; Internal.logFine(this, "cleared"); }
/** * Dispose this backup instance and, if <code>disposeDestination</code> is true, dispose the connection to * the destination database as well. * <p/> * You might want to pass <code>false</code> to this method to subsequently call {@link #getDestinationConnection()} * and perform any actions on the fresh backup of the database, then dispose it yourself. * * @param disposeDestination if true, connection to the destination database will be disposed */ public void dispose(boolean disposeDestination) { try { mySourceController.validate(); myDestinationController.validate(); } catch (SQLiteException e) { Internal.recoverableError(this, "invalid dispose: " + e, true); return; } Internal.logFine(this, "disposing"); SWIGTYPE_p_sqlite3_backup handle = myHandle; if (handle != null) { _SQLiteSwigged.sqlite3_backup_finish(handle); myHandle = null; mySourceController = SQLiteController.getDisposed(mySourceController); myDestinationController = SQLiteController.getDisposed(myDestinationController); } if (disposeDestination) { myDestination.dispose(); } }
/** * Disposes this instance, making it unusable and freeing the resources. If the array table is cached, * then it is unbound from values (emptied) and returned to the cache. If the array table is not cached, * it is deleted from the database. * <p/> * This method is partially thread-safe. When called not from the confining thread, the exception will not be * thrown, but the method will do nothing. * <p/> * Calling <code>dispose()</code> second time has no effect. * <p/> * Calling {@link #bind} after instance has been disposed would result in exception. */ public void dispose() { if (myHandle == null) return; SQLiteController controller = myController; try { controller.validate(); } catch (SQLiteException e) { Internal.recoverableError(this, "invalid dispose: " + e, true); return; } Internal.logFine(this, "disposing"); controller.dispose(this); myHandle = null; myController = SQLiteController.getDisposed(myController); myDisposed = true; }