Is there anything like asp.net transactions in Android SQLite? I am doing some processing on an SQLite database from my Android code, but I want upon failure to rollback the transaction and return the database to it’s original state before the processing started.
Can this be achieved?
thanks
It’s already there in the methods provided by the framework.
Check the SQLiteDatabase class docs here.
Specifically what you want are the
*WithOnConflictmethods and use the constantCONFLICT_ROLLBACKin said methods.