Skip to content
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

Comparison with SQLite Plugin 2? #547

Open
brodycj opened this issue Sep 5, 2016 · 3 comments
Open

Comparison with SQLite Plugin 2? #547

brodycj opened this issue Sep 5, 2016 · 3 comments

Comments

@brodycj
Copy link
Contributor

brodycj commented Sep 5, 2016

From a quick test https://github.com/nolanlawson/cordova-plugin-sqlite-2 seems to do better in some but not all tests in https://github.com/brodybits/Cordova-sqlite-perftest (with 3 minor changes). SQLite plugin 2 claims to be more compliant to the Web SQL spec and seems to be mostly tested against PouchDB. SQLite plugin 2 also uses https://github.com/nolanlawson/node-websql which could let programmers develop and test Web SQL code using NodeJS before testing on a mobile platform.

A minor thing I discovered is that if an integer number is stored in a column with no type specified the value is not read as an integer on Android. I had to change !== to != in a couple places in Cordova-sqlite-perftest to get it to work on Android.

SQLite plugin 2 is of course missing the utility close/delete functionality and does not allow the database location to be specified on iOS.

Another thing is that looking at the native platform code, I am not sure how much if it is really original and how much was copied from this project. The iOS version of this project was written by someone else and released under the MIT license while sqlite plugin 2 is released under the Apache 2.0 license.

An idea may be to use the JavaScript from sqlite plugin 2 (which mostly packages node-websql) with the native platform code from this project to support Android/iOS/Windows all together.

P.S. An additional item to test is the maximum amount of data can be inserted in a single transaction.

@chauthai
Copy link

As stated in the blog post for SQLite Plugin 2 it's a fork of this project.

I like your idea for merging both projects! What's your rough estimate how long a merge might take?

@brodycj
Copy link
Contributor Author

brodycj commented Sep 21, 2016

As stated in the blog post for SQLite Plugin 2 it's a fork of this project.

Yes it is a fork but from the description it looks more like a rewrite.

I like your idea for merging both projects! What's your rough estimate how long a merge might take?

Answer in #548 (comment)

@brodycj
Copy link
Contributor Author

brodycj commented Mar 31, 2017

Also sqlite-plugin-2 is that it shares the Web SQL API implementation with nolanlawson / node-websql.

As described in storesafe/cordova-sqlite-storage-help#11 developers can use nolanlawson / node-websql directly when porting their apps to Node.js based frameworks such as electron or nw.js (nee node-webkit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants