diff --git a/src/net/sqlcipher/database/SQLiteStatement.java b/src/net/sqlcipher/database/SQLiteStatement.java index cb8e17fe..dbe60404 100644 --- a/src/net/sqlcipher/database/SQLiteStatement.java +++ b/src/net/sqlcipher/database/SQLiteStatement.java @@ -90,6 +90,24 @@ public long executeInsert() { } } + public long executeUpdateDelete() { + if (!mDatabase.isOpen()) { + throw new IllegalStateException("database " + mDatabase.getPath() + " already closed"); + } + long timeStart = SystemClock.uptimeMillis(); + mDatabase.lock(); + + acquireReference(); + try { + native_execute(); + mDatabase.logTimeStat(mSql, timeStart); + return mDatabase.lastChangeCount(); + } finally { + releaseReference(); + mDatabase.unlock(); + } + } + /** * Execute a statement that returns a 1 by 1 table with a numeric value. * For example, SELECT COUNT(*) FROM table;