j256 / ormlite-android

ORMLite Android functionality used in conjunction with ormlite-core
http://ormlite.com/
ISC License
1.59k stars 366 forks source link

Fixed UpdateBuilder.update() / DeleteBuilder.delete() always return 0 when WAL enabled #143

Open TYZRPVX opened 1 year ago

TYZRPVX commented 1 year ago

Fixed UpdateBuilder.update() / DeleteBuilder.delete() always return 0 when WAL enabled

  1. The root cause is the same as referred in https://github.com/j256/ormlite-android/pull/131
  2. Maybe reflection is necessary, execSQL returns void, but executeSql returns correct value
  3. Calling methods in a compatible way has been verified and correctness is guaranteed, if executeSql failed, call execSQL

Thanks for reviewing this PR

j256 commented 1 year ago

Thanks for this. Submitted a couple of things for consideration.

TYZRPVX commented 1 year ago

@j256 May you review again, thanks for the efforts