I’m currently using Ormlite version 4.42 with Android. What I want to do is determine whether Ormlite has the ability to return the number of records updated. Something such as the following:
SQLiteDatabase db = dbHelper.getWritableDatabase();
count = db.update(COMPANY_TABLE_NAME, values, where, whereArgs);
Instead of using a direct SQLiteDatabase connection, I want to leverage Ormlite in my content providers. Just curious as to whether this is an option.
This should work as long as you are using ORMLite version 4.39 or later. I now do an additional SQL statement to get the number of changes from the previous one. From the change-log:
You could use the
UpdateBuildercode to make the changes:There are also online docs for
UpdateBuilder.