Not able to update sqlite_sequence table using RoomDatabase.query
Room
doesn't use SQLiteDatabase - but it uses SupportSQLiteDatabase, while it's source code states, that it delegates all calls to an implementation of {@link SQLiteDatabase}
... I could even dig further - but I'm convinced, that this is a consistency feature and not a bug.
SQLiteDatabase.execSQL()
still works fine, but with SupportSQLiteDatabase.execSQL()
the same UPDATE
or DELETE
queries against internal tables have no effect and do not throw errors.
my MaintenanceHelper
is available on GitHub. it is important that one initially lets Room
create the database - then one can manipulate the internal tables with SQLiteDatabase.execSQL()
. while researching I've came across annotation @SkipQueryVerification, which could possibly permit UPDATE
or DELETE
on table sqlite_sequence
; I've only managed to perform a SELECT
with Dao
... which in general all hints for the internal tables are being treated as read-only
, from the perspective of the publicly available API; all manipulation attempts are being silently ignored.