/** * Execute a raw SQL statement. May throw a runtime exception if there is an error parsing the SQL or some other * error * * @param sql the statement to execute * @see ISQLiteDatabase#execSQL(String) */ public void execSqlOrThrow(String sql) { acquireNonExclusiveLock(); try { getDatabase().execSQL(sql); } finally { releaseNonExclusiveLock(); } }
/** * Execute a raw SQL statement with optional arguments. The sql string may contain '?' placeholders for the * arguments. May throw a runtime exception if there is an error parsing the SQL or some other error * * @param sql the statement to execute * @param bindArgs the arguments to bind to the statement * @see ISQLiteDatabase#execSQL(String, Object[]) */ public void execSqlOrThrow(String sql, Object[] bindArgs) { acquireNonExclusiveLock(); try { getDatabase().execSQL(sql, bindArgs); } finally { releaseNonExclusiveLock(); } }
/** * Execute a raw SQL statement * * @param sql the statement to execute * @return true if the statement executed without an error * @see ISQLiteDatabase#execSQL(String) */ public boolean tryExecSql(String sql) { acquireNonExclusiveLock(); try { getDatabase().execSQL(sql); return true; } catch (RuntimeException e) { onError("Failed to execute statement: " + sql, e); return false; } finally { releaseNonExclusiveLock(); } }
/** * Execute a raw SQL statement with optional arguments. The sql string may contain '?' placeholders for the * arguments. * * @param sql the statement to execute * @param bindArgs the arguments to bind to the statement * @return true if the statement executed without an error * @see ISQLiteDatabase#execSQL(String, Object[]) */ public boolean tryExecSql(String sql, Object[] bindArgs) { acquireNonExclusiveLock(); try { getDatabase().execSQL(sql, bindArgs); return true; } catch (RuntimeException e) { onError("Failed to execute statement: " + sql, e); return false; } finally { releaseNonExclusiveLock(); } }
/** * Execute a raw SQL statement. May throw a runtime exception if there is an error parsing the SQL or some other * error * * @param sql the statement to execute * @see ISQLiteDatabase#execSQL(String) */ public void execSqlOrThrow(String sql) { acquireNonExclusiveLock(); try { getDatabase().execSQL(sql); } finally { releaseNonExclusiveLock(); } }
/** * Execute a raw SQL statement with optional arguments. The sql string may contain '?' placeholders for the * arguments. May throw a runtime exception if there is an error parsing the SQL or some other error * * @param sql the statement to execute * @param bindArgs the arguments to bind to the statement * @see ISQLiteDatabase#execSQL(String, Object[]) */ public void execSqlOrThrow(String sql, Object[] bindArgs) { acquireNonExclusiveLock(); try { getDatabase().execSQL(sql, bindArgs); } finally { releaseNonExclusiveLock(); } }
/** * Execute a raw SQL statement * * @param sql the statement to execute * @return true if the statement executed without an error * @see ISQLiteDatabase#execSQL(String) */ public boolean tryExecSql(String sql) { acquireNonExclusiveLock(); try { getDatabase().execSQL(sql); return true; } catch (RuntimeException e) { onError("Failed to execute statement: " + sql, e); return false; } finally { releaseNonExclusiveLock(); } }
/** * Execute a raw SQL statement with optional arguments. The sql string may contain '?' placeholders for the * arguments. * * @param sql the statement to execute * @param bindArgs the arguments to bind to the statement * @return true if the statement executed without an error * @see ISQLiteDatabase#execSQL(String, Object[]) */ public boolean tryExecSql(String sql, Object[] bindArgs) { acquireNonExclusiveLock(); try { getDatabase().execSQL(sql, bindArgs); return true; } catch (RuntimeException e) { onError("Failed to execute statement: " + sql, e); return false; } finally { releaseNonExclusiveLock(); } }