I work with db (without content provider), and I'm interested to know when data will be written to the SD card. Does it happen immediately after method is call (Ex: insert, update) or is there a buffer in between the only writes occasionally, or when the buffer i开发者_高级运维s full? (do I need have some method for saving the DB in onPause, or it's will be work correctly anywhere?)
P.S. the DB is closed when the application exits.
Does it happen immediately after method is call (Ex: insert, update)
Yes. More accurately, it happens immediately upon completion of the transaction. If you are not using your own transactions, each insert/update/delete/execSQL call is its own transaction.
or is there a buffer in between the only writes occasionally, or when the buffer is full?
No.
精彩评论