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

Browser support WIP using SQL.js #774

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Browser support WIP using SQL.js #774

wants to merge 3 commits into from

Conversation

brodycj
Copy link
Contributor

@brodycj brodycj commented Apr 24, 2018

In followup to discussion in #576 (initial browser support WIP) I have started again using kripken / sql.js, actually sql-memory-growth.js which is now fetched from edge WIP version of litehelpers / Cordova-sqlite-storage-dependencies. This is a major feature for the planned June 2018 release (#773).

This is a WORK IN PROGRESS in the cb-browser-sqljs-wip branch with a number of missing items. @brodybits expects to force push updates to this WIP branch.

To try this in a TEST project, be sure to completely remove any existing sqlite plugin and then add the WIP version branch as follows (using the following Cordova CLI):

cordova plugin add https://github.com/litehelpers/Cordova-sqlite-storage#cb-browser-sqljs-wip

NOTE that this is NOT expected to work in multi-page apps due to lack of actual persistence. (It SHOULD be possible to implement a workaround solution for persistence across page changes, at least in theory. I can look further into this idea if there is sufficient demand from the user community.)

P.S. I actually had to use sql-memory-growth.js to prevent "cannot enlarge memory arrays" errors when running the test suite.

P.S.S. It should be possible to implement pre-populated database feature on the browser platform using the File API, at least in theory. I can look further into this idea if there is sufficient demand from the user community.

Christopher J. Brody added 3 commits April 23, 2018 19:07
(sql-memory-growth.js from SQL.js)

XXX with MAJOR TODO ITEMS:
- update license statement with SQL.js dependency
- deal with failing & skipped test cases
- update documentation
- also test browser platform with (WebKit) Web SQL
- SQL.js with R-Tree enabled
XXX TBD: selfTest NOT WORKING on browser platform,
due to lack of actual persistence
@humblecoder
Copy link

Definitely going to need persistence. Otherwise, we might as well just use sql.js from the start . . . no? 🤔

@brodycj
Copy link
Contributor Author

brodycj commented Aug 14, 2018

@humblecoder this plugin would only use SQL.js on the browser platform, with missing persistence, to support easier testing for app developers. Motivation for using SQL.js, with lack of persistence, is described in #576 (comment).

Support for browser platform with persistence working is possible, I can think of the following alternatives:

(with some adaptations)

Feature priority is given to paid customers. For more information please contact: [email protected]

@brodycj brodycj changed the base branch from storage-master to dev February 18, 2019 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants