nolanlawson / cordova-plugin-sqlite-2

Native SQLite database API for Cordova/PhoneGap/Ionic, modeled after WebSQL (UNMAINTAINED)
https://nolanlawson.com/2016/04/10/introducing-the-cordova-sqlite-plugin-2/
Apache License 2.0
168 stars 28 forks source link

Database Caching + BLOB + PRAGMA #60

Closed qkdreyer closed 3 years ago

qkdreyer commented 6 years ago

This PR is fixing a few issues I've encountered while using your plugin.

nolanlawson commented 6 years ago

Thanks very much for the PR! A few quick questions:

  1. It would be nice to have tests for the PRAGMA query… is the test just that PRAGMAs work at all?
  2. What do you mean by correctly handling the SQLite BLOBs? What does it do incorrectly right now?
  3. What problem does the cache solve?

Again, thank you for the PR, just trying to understand the work you've done here. :)

qkdreyer commented 6 years ago
  1. PRAGMA queries were treated as update/insert/delete queries in SQLitePlugin.java, but shoud be treated as select instead.
  2. It is now possible to retrieve images stored in BLOB.
  3. The previous caching system was "only read database file once and keep it cached forever". But if one replaces the database file after it was read and kept in cache, it needs to be re-opened.
nolanlawson commented 6 years ago

Thanks much for the explanation. I think ideally this would be three separate PRs and there would be a test to demonstrate each one. I may have time to do this myself, but it would be awesome if you had the time to make those fixes.

(The tests seem to be failing due to Sauce Labs issues, unrelated. I need to configure Sauce Labs to work correctly for non-owners.)

nolanlawson commented 6 years ago

Testing in #62, there appear to be test failures

nolanlawson commented 3 years ago

I'm marking this repo as unmaintained, sorry that we were not able to move forward on this PR