News for hackers. Stuff that matters.
Re:IndexedDB is completely broken in latest Safari by masklinn on Tuesday June 15, 2021 @02:37AM (#27512026)
I mean I can understand why they dropped websql, as great a project as SQLite is, mandating that browsers expose SQLite is not a spec, and expecting a complete reimplementation of sql by browser developers would be foolish.

But yeah the assertion that indexeddb is any good is hardly convincing.

Nowadays you can use sqlite3 through wasm if you want, though I don’t know how you’d handle the persistence layer.

Re:IndexedDB is completely broken in latest Safari by tehbeard on Tuesday June 15, 2021 @02:49AM (#27512126)
> Nowadays you can use sqlite3 through wasm if you want, though I don’t know how you’d handle the persistence layer.

There was a post on here in the last month or 2, atleast for reading, that used http range headers for reading the db pages.

as for writing, you're gonna hate this, but a vfs impl. for SQLite using indexedDB as the backing store is your best option (Safari stupidity not withstanding)

Re:IndexedDB is completely broken in latest Safari by masklinn on Tuesday June 15, 2021 @05:21AM (#27512925)
> There was a post on here in the last month or 2, atleast for reading, that used http range headers for reading the db pages.

That was for a local SQLite doing remote loads/stores, I was thinking more local loads/stores, what websql would have provided.

> as for writing, you're gonna hate this, but a vfs impl. for SQLite using indexedDB as the backing store is your best option (Safari stupidity not withstanding)

Yeah that’s what I was figuring out but then it feels like the SQLite bits are significantly less useful, and I’m not sure how good indexeddb is at being a block device.

Re:IndexedDB is completely broken in latest Safari by int_19h on Tuesday June 15, 2021 @04:22AM (#27512631)
You can still mandate a spec, and if everybody ends up picking SQLite to implement it, so what?
Re:IndexedDB is completely broken in latest Safari by otabdeveloper4 on Tuesday June 15, 2021 @06:49AM (#27513428)
"Just use SQLite, lol" is not a spec.

P.S. SQLite doesn't have a spec. Once you start really using it and bumping into version differences, extensions, etc., you'll really feel the pain caused by this.

Re:IndexedDB is completely broken in latest Safari by brigandish on Tuesday June 15, 2021 @09:02PM (#27523692)
Why do you care more about this mythical spec - which clearly is s load of rubbish if IndexedDB is anything to go by - versus a working, powerful technology that is as close to being able to be dropped in quickly as one could hope for?
Re:IndexedDB is completely broken in latest Safari by otabdeveloper4 on Thursday June 17, 2021 @03:31PM (#27543595)
> working

Not after Google and Apple get their hands on it.

Re:IndexedDB is completely broken in latest Safari by int_19h on Tuesday June 15, 2021 @07:25AM (#27513712)
I didn't say that it is. But you could make a spec that is implementable using SQLite.

And no, it's not the same as mandating SQLite.

Re:IndexedDB is completely broken in latest Safari by otabdeveloper4 on Tuesday June 15, 2021 @10:29AM (#27516028)
> But you could make a spec that is implementable using SQLite.

Yes, that would be the smart choice. But alas.

Re:IndexedDB is completely broken in latest Safari by aseipp on Tuesday June 15, 2021 @12:43PM (#27517964)
You can try to language-lawyer this as much as you want, but it doesn't matter; Browser developers clearly do not want to just adopt SQL into the browser layer without there being multiple independent implementations, and scoping the problem so that you can act all "whoops, wow, what did I trip over right here? so convenient!" to use SQLite and be done with it, is a tactic they almost certainly can predict and see as a bad one, nearly equivalent to just mandating it in the first place.

Like, does anybody here really think their actual complaints are about some minutae about wording in a spec about "mandates" or whatever? Their rejection is quite clearly against the spirit of the design, and again because because they don't think multiple browsers each independently reproducing a whole SQL stack with equivalent semantics is viable. It's not about technical nits or wordsmithing, little coder-logic-tricks aren't going to work.

Re:IndexedDB is completely broken in latest Safari by brigandish on Tuesday June 15, 2021 @09:12PM (#27523772)
> Browser developers clearly do not want to just adopt SQL into the browser layer

Why would they think it’s more viable as a JavaScript spec than a SQL one? It seems to me it’s about retaining control and about giving what some web devs want - JavaScript everywhere.

Re:IndexedDB is completely broken in latest Safari by masklinn on Tuesday June 15, 2021 @05:25AM (#27512945)
If you write the spec to be compatible with SQLite and everyone picks that, then you have in essence mandated SQLite and your spec is at the mercy of the project’s decisions.

If you write the spec to not be compatible with SQLite then every browser has to implement its own SQL layer which is a huge effort and frankly a waste because SQL is kinda shit.

Re:IndexedDB is completely broken in latest Safari by hajile on Tuesday June 15, 2021 @10:11AM (#27515784)
SQLite is open source. If it goes away from the direction you want, then fork it. That's still way less effort than implementing a bunch of different IndexedDB variants.