Why does a delete rawQuery need a moveToFirst in order to actually delete the rows?

前端 未结 5 1219
难免孤独
难免孤独 2020-12-29 23:40

I have been struggling for hours trying to debug why the following delete query actually didn\'t delete anything even if the exact same query on the exact same database work

5条回答
  •  再見小時候
    2020-12-30 00:04

    The answer why is because rawQuery actually doesn't execute til u call some method on returned cursor. moveToFirst, isAfterLast ..

提交回复
热议问题