-
Notifications
You must be signed in to change notification settings - Fork 714
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
Support for browser platform (with WebSQL). #575
Conversation
Hi @rafw87 thanks for the contribution. Did you run it against the full test suite? Looking at the changes I don't think it will pass the error handling tests. Please correct me if I am mistaken somehow. To be honest I was considering a much different approach. |
I checked this error handling tests and I see that most of errors are caused by different error messages etc than expected, for example: I see that there are different expectations for different environments (Windows, Android, WP8), so maybe it should be done that way for browser platform (expectations like for isWebSql)? |
Hi, It's possible that some cases are not handled properly. I didn't spend so much time for this platform, it was rather a quick change to have code in my project more clean. I decided to share it "as-is", maybe it will be useful for someone. Thanks for this plugin:) -------- Oryginalna wiadomość -------- Od: Chris Brody notifications@github.com Data:25.10.2016 10:21 (GMT+01:00) Do: litehelpers/Cordova-sqlite-storage Cordova-sqlite-storage@noreply.github.com DW: rafw87 raf_w87@wp.pl, Mention mention@noreply.github.com Temat: Re: [litehelpers/Cordova-sqlite-storage] Support for browser platform
(with WebSQL). (#575) Looking at the changes I don't think it will pass the error handling tests. Please correct me if I am mistaken somehow. To be honest I was considering a much different approach. — |
The CI jobs test the Android and iOS platform implementations. There is no CI for the browser platform since it would be new. (Also there is currently no CI for Windows.)
Thanks for sharing. It was definitely very interesting to try running it. I think it will take a very different approach to pass some of the more difficult tests including nested transactions, error handling, and error recovery. I will work on this when I get a chance. Discussion will be continued in #297.
You are welcome) |
Closing in favor of PR #576 |
This is a simple implementation of browser platform, using WebSQL.
It doesn't have implementation of .close() and .deleteDatabase(), these methods are calling success() but are doing nothing (except writing warning to log). Due of it, selfTest is passing only once and reguires to clear database manually.
EDIT: second commit implements .deleteDatabase() by deleting all tables - it's enough to fix selfTest.