Android: SQLite transactions when using ContentResolver

前端 未结 4 1947
一个人的身影
一个人的身影 2020-12-12 14:30

The goal: refresh database from XML data

The process:

  • Start transaction
  • Delete all existing rows from the ta
4条回答
  •  忘掉有多难
    2020-12-12 15:13

    All right - so this does not dingle aimlessly: the only way I can think of is to code startTransaction and endTransaction as URL-based query requests. Something like ContentResolver.query(START_TRANSACTION, null, null, null, null). Then in ContentProvider#query based on the registered URL call start or end transaction

提交回复
热议问题