Skip to content

Browser support WIP using SQL.js#774

Open
brody2consult wants to merge 3 commits into
devfrom
cb-browser-sqljs-wip
Open

Browser support WIP using SQL.js#774
brody2consult wants to merge 3 commits into
devfrom
cb-browser-sqljs-wip

Conversation

@brody2consult

@brody2consult brody2consult commented Apr 24, 2018

Copy link
Copy Markdown
Owner

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
Copy Markdown

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

@brody2consult

Copy link
Copy Markdown
Owner Author

@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: sales@litehelpers.net

@brody2consult brody2consult 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