-
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
Better Android sqlite database library #222
Comments
NOTE: unfortunately the sqlite4java project does not have ICU-UNICODE string manipulation support integrated, unlike the newer versions of the standard Android SQLite and SQLCipher for Android libraries. |
The ultimate android sqlite library would be this one: https://github.com/moneymanagerex/SQLite-Android-Bindings because it builds a custom sqlite with no limitations You can even compile your own custom sqlite extensions into it. |
I am confused with all this different SQLite libraries. |
Some feedback from http://ost.io/@litehelpers/Cordova-sqlite-storage/topics/4 - sqlite4java issue on some Android tablets:
NOTE (UPDATE): adding the bug label since I am not 100% happy with the results of using sqlite4java. I am planning to make a lightweight wrapper for the Android version using https://github.com/sqlg/SQLiteGlue-core, which will hopefully solve these integration issues. |
Thanks @MetaMemoryT, agreed but there are two major problems:
@mladenp sorry about the confusion. The built-in Android sqlite database library is not a very good fit for the needs of this plugin as described above. Also, as reported in #193 sometimes people were losing data in newer versions of Android. The sqlite4java library is a lighter-weight library that is a better fit for the needs of this project and is not affected by the problem reported in #193. But since some people also had problems with the sqlite4java library that is why I have made it optional. If you have any more questions please do not hesitate to ask. You can also ask privately by e-mail to: [email protected] |
Hey Brody thanks for clearing this. Too bad i use Ionic and plan to implement Crosswalk. |
NOTE: I heard (at an Amazon AWS conference) that the Amazon Fire-OS should be able to work with the NDK. Needs further research and testing. |
I have now replaced sqlite4java with Android-sqlite-connector which is extremely lightweight. Android-sqlite-connector is written in pure-Java and uses either Android-sqlite-native-driver or Android-sqlcipher-native-driver to get the native sqlite (or sqlcipher) access. It now passes the existing test suite, except for dealing with Unicode NULL ( NOTE: I was able to put the native libraries in a jar, with a trick that they have to be in the |
The built-in Android database library had some major deficiencies in the past and has gone through some updates. Unfortunately, some people have reported some issues with locking and also losing data (see #193), for which a workaround has been published. The workaround is basically a real kludge that simply closes and reopens the database whenever a transaction is committed (not provided for the case of
db.executeSql()
). But someone was still having problems even with the workaround in place. I find this condition is absolutely unacceptable!Another workaround is to use the version for sqlcipher (with no password key specified) at: https://github.com/brodysoft/Cordova-sqlcipher-adaptor
A better solution would be to include and use sqlite4java (https://code.google.com/p/sqlite4java/), which seems to be much thinner. Unfortunately Google Code will be shut down, so I just raised https://code.google.com/p/sqlite4java/issues/detail?id=75 to migrate that project and also made a clone here: https://sourceforge.net/projects/brody-sqlite4java/
UPDATE: sqlite4java Javadoc here: http://almworks.com/sqlite4java/javadoc/com/almworks/sqlite4java/package-summary.html
The text was updated successfully, but these errors were encountered: