Java Code Examples for android.database.sqlite.SQLiteStatement.releaseReference()

The following are Jave code examples for showing how to use releaseReference() of the android.database.sqlite.SQLiteStatement class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: GitHub   File: DbManagerImpl.java   Source Code and License Vote up 6 votes
@Override
public int executeUpdateDelete(SqlInfo sqlInfo) throws DbException {
    SQLiteStatement statement = null;
    try {
        statement = sqlInfo.buildStatement(database);
        return statement.executeUpdateDelete();
    } catch (Throwable e) {
        throw new DbException(e);
    } finally {
        if (statement != null) {
            try {
                statement.releaseReference();
            } catch (Throwable ex) {
                LogUtil.e(ex.getMessage(), ex);
            }
        }
    }
}
 
Example 2
Project: GitHub   File: DbManagerImpl.java   Source Code and License Vote up 6 votes
@Override
public int executeUpdateDelete(String sql) throws DbException {
    SQLiteStatement statement = null;
    try {
        statement = database.compileStatement(sql);
        return statement.executeUpdateDelete();
    } catch (Throwable e) {
        throw new DbException(e);
    } finally {
        if (statement != null) {
            try {
                statement.releaseReference();
            } catch (Throwable ex) {
                LogUtil.e(ex.getMessage(), ex);
            }
        }
    }
}
 
Example 3
Project: GitHub   File: DbManagerImpl.java   Source Code and License Vote up 6 votes
@Override
public void execNonQuery(SqlInfo sqlInfo) throws DbException {
    SQLiteStatement statement = null;
    try {
        statement = sqlInfo.buildStatement(database);
        statement.execute();
    } catch (Throwable e) {
        throw new DbException(e);
    } finally {
        if (statement != null) {
            try {
                statement.releaseReference();
            } catch (Throwable ex) {
                LogUtil.e(ex.getMessage(), ex);
            }
        }
    }
}