ORMLite - CallBatchTasks () individually or once for all updates?

I use ORMLite on Android and have 7 tables in which I need to create / update multiple records.

I am using the callBatchTasks() method for each of my dao separately for this at the moment, but I was wondering if it is possible to use / use one dao callBatchTasks() to handle all updates?

Is it really going to speed up the process?

+8
android ormlite
source share
1 answer

Interest Ask. With ORMLite for Android, all DAOs use the same connection to the same database. Therefore, although this looks a little rude, you can use one call to fooDao.callBatchTasks() to update the Foo , Bar and Baz tables. This disables the automatic commit on the connection, applies any create / update calls you want to use for the tables, and then writes all changes at the end.

+8
source share

All Articles