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

Pre-populated databases & other enhancements missing #6

Open
brodycj opened this issue Aug 30, 2016 · 8 comments
Open

Pre-populated databases & other enhancements missing #6

brodycj opened this issue Aug 30, 2016 · 8 comments

Comments

@brodycj
Copy link
Contributor

brodycj commented Aug 30, 2016

I received a nice note from someone who needs this with pre-populated database feature. Unfortunately I did not have much time to merge it in due to some other backlog. This feature will be included when I get a chance.

@ThijsAmersfoort
Copy link

I was able to add this feature by only copying some lines from the cordova-sqlite-ext java file. The updated SQLitePlugin.java is attached here (with .txt extension, since .java is not supported). Have tested it and it worked.

SQLitePlugin.txt

@brodycj
Copy link
Contributor Author

brodycj commented Sep 8, 2016

Thanks @ThijsAmersfoort. When I merge it will include support for all platforms (Android/iOS/Windows), automatic testing, and documentation.

@jeandat
Copy link

jeandat commented Mar 5, 2018

Hi, I'm wondering for a future project, is it possible as of today to open an existing database (with data in it) ? Thx.

@brodycj
Copy link
Contributor Author

brodycj commented Mar 5, 2018

Hi, I'm wondering for a future project, is it possible as of today to open an existing database (with data in it) ?

You still have to use cordova-sqlite-ext for now, hoping to fix this one in the next couple months or so.

@jeandat
Copy link

jeandat commented Mar 5, 2018

I forgot to mention: does it work with a downloaded file. My database will not be present in the www folder at startup. It is downloaded at runtime.

@brodycj
Copy link
Contributor Author

brodycj commented Mar 5, 2018

I forgot to mention: does it work with a downloaded file. My database will not be present in the www folder at startup. It is downloaded at runtime.

I just opened storesafe/cordova-sqlite-storage-help#42 to get this documented.

I would like to add a reminder that this plugin version is available under GPL or commercial license options. The cordova-sqlite-storage, cordova-sqlite-ext, cordova-sqlcipher-adapter, and cordova-sqlite-legacy plugin versions have permissive license terms.

@jeandat
Copy link

jeandat commented Mar 6, 2018

Thanks. I still have a few more questions (sorry):

I read all the docs, and it seems to me that with Cordova-sqlite-evcore-extbuild-free you can open at least one database saved in a custom location on Android and iOS.

  • Can you open several files (databases) concurrently? For instance, if you download a new version of your database and need to compare some data between the old and the new?
  • is it fine to use Cordova-sqlite-evcore-extbuild-free for a client app?

And last, a gentle advice, it is quite hard to find information in a single gigantic readme file. An automatic TOC header at the beginning of the file would be a nice addition if you don't/can't cut it into several files.

Thanks a lot.

@brodycj
Copy link
Contributor Author

brodycj commented Mar 6, 2018

I read all the docs, and it seems to me that with Cordova-sqlite-evcore-extbuild-free you can open at least one database saved in a custom location on Android [...]

... arbitrary (custom) location on Android only, planning to support on all platforms at some point in the future ref: brodycj/cordova-sqlite-ext#43

Can you open several files (databases) concurrently?

Yes if they do not have the same database file name.

For instance, if you download a new version of your database and need to compare some data between the old and the new?

This would be possible if the old database and new database do not share the same file name. But I would favor a different approach, such as downloading the data in JSON format. Other pre-populated database options are discussed in storesafe/cordova-sqlite-storage-help#26.

is it fine to use Cordova-sqlite-evcore-extbuild-free for a client app?

Only if the client is aware of the license terms (GPL or commercial). Please contact [email protected] if you are interested in a redistribution license.

[...] it is quite hard to find information in a single gigantic readme file. An automatic TOC header at the beginning of the file would be a nice addition [...]

See storesafe/cordova-sqlite-storage-help#33, thanks for the feedback.

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

3 participants