-
Notifications
You must be signed in to change notification settings - Fork 714
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
Sqlite databse corruption #643
Comments
As discussed in #626:
Will be documented soon. |
In my java plugin I use the following code:
If there are multiple threads that access the database in the same time, is your solution solve the problem ? |
What is
Yes, assuming that there is not a bug in the builtin android.database implementation. This may depend on which Android version and maybe which system build is installed on the device.
I have not looked at this one. In general I do not really favor WAL (write ahead logging ref: https://www.sqlite.org/wal.html) since it would require the overhead of checkpointing at certain intervals. I also just discovered an interesting issue at http://stackoverflow.com/questions/39149065/sqlite-write-ahead-logging-wal-journal-mode-with-attached-database.
I recommend that you look in the dbmap at https://github.com/litehelpers/Cordova-sqlite-storage/blob/storage-master/src/android/io/sqlc/SQLitePlugin.java#L39 and follow the objects until you get the SQLiteDatabase connection. Please report if these answers help solve your problem or not. |
Another solution may be to use an Android content provider to store and retrieve data as discussed in storesafe/cordova-sqlite-storage-help#9:
|
Closing as invalid with info needed due to lack of response. Please feel free to ask here or in a new issue if you have any more questions. |
Hello,
I use your plugin in my ionic application on android platform , and I have a plugin that uses the SQLiteDatabase class to work with the database created by your plugin.
But when my java code access the database in the same time when I access the database from javascript using your plugin, the app crashes and the database is corrupted.
Please help me to solve this problem.
The text was updated successfully, but these errors were encountered: