-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SQL Upsert Compatibility Issue for Android 10 and Lower #106
base: master
Are you sure you want to change the base?
Conversation
I use upsert in order to update chapters when it exist and if it doesn't exist then just insert a new chapter into db |
when this error happens and what is your phone model? |
Got the idea, but somehow when it try insert a new chapters, it shows an error message |
I tried to insert chapter using a samsung device with android 11 and then nothing happed, there wasn't an error , even app doesn't crashed |
I'm using Android 10, maybe the SQLite version on the device is causing this issue, The phrase "ON CONFLICT" is also part of UPSERT, which is an extension to INSERT added in version 3.24.0 (2018-06-04). |
Found the solution, we can use |
This reverts commit 136016b.
Insert or Replace are very different from using Insert ..... Do Update Set |
it's better to not change the current database queries |
when operation use replace, a completely new object is created in database that is completely unrelated to the previous one and because of that is cause a very serious issue in lazyColumn widget |
Hmm, it's true, maybe use a conditional statement to imitate upsert behavior? |
This reverts commit 9874616.
I tried on android 7 device and there was not an issue or break in app functionality? |
Android 10, Poco X3 NFC |
Just tested the lastest release(v0.1.38), seems fine. |
Using
upsert
when inserting non-existing chapters the app shows an error. When I change it toinsert
, it works just fine. I don't really understand SQL, but this fixes the issue.I've also collected some logs, if my changes are not a desired behavior please give some advice xD