google / lovefield

Lovefield is a relational database for web apps. Written in JavaScript, works cross-browser. Provides SQL-like APIs that are fast, safe, and easy to use.
https://google.github.io/lovefield/
Apache License 2.0
6.81k stars 366 forks source link

Safari <8 support ? #23

Closed sandrobilbeisi closed 9 years ago

sandrobilbeisi commented 9 years ago

I have read the docs and tried the demos at http://google.github.io/lovefield/ and indeed LoveField does NOT yet support Safari

Is there any chance of officially supporting Safari via a shim such as : IndexedDB Polyfill over WebSql or FaceBook's IndexedDB polyfil

Safari 7.1 theoretically supports IndexedDB according to CanIUse.com Apple has officially stated at WWDC 2014 that Safari 8 and iOS 8 will have full support for IndexedDB.

If there won't be any official support then it would be timely for us to provide a patch with Safari support.

arthurhsu commented 9 years ago

Currently the team doesn't have resource (both hardware and time) to play with Safari. I've found the same broken bad for Safari 7.1 on Mac as reported here: http://www.raymondcamden.com/2014/9/25/IndexedDB-on-iOS-8--Broken-Bad

We definitely want to support Safari when Apple/WebKit fixes the bugs. https://bugs.webkit.org/show_bug.cgi?id=136888 https://bugs.webkit.org/show_bug.cgi?id=136937

I personally don't think polyfill is the way to go. Writing a SQL-based lf.BackStore would be faster/easier than testing on a polyfill. A pull request will be more than ideal, too :)

arthurhsu commented 9 years ago

WebSQL based back store is implemented, since we saw no sign that Apple will fix their IndexedDB bug any time soon. Please consider this is a gap filling solution and we'll remove this backstore as soon as Apple fixes their bugs.

Change 655024eb281ac4793ff78bd3632c6a764f280a41 contains the finalized code.

arthurhsu commented 9 years ago

Tested broken on iOS 8 Safari and OSX 10.10 Safari, investigating.

arthurhsu commented 9 years ago

Fixed 2e6ba5f70c1d8754d45fa2d5d8b1620919a87c08