4 ms·
I can kinda see the point as far as difficulty in standardizing for a spec, but on the other hand, IndexedDB is amazingly feature-poor compared to SQLite. I'm n
by ufmace 10y ago
I can kinda see the point as far as difficulty in standardizing for a spec, but on the other hand, IndexedDB is amazingly feature-poor compared to SQLite. I'm not generally a big fan of NoSQL, but I'll forgive the lack of JOINs and related sub-querying functionality given the nature of it.
I just started messing with it a few days ago, and so far, you can only query on indexed fields, and only one at a time, and the only allowed conditions are <, <=, >, >=, and =. If you want any kind of compound conditions, you're going to have to do it manually. There's no documentation for how to sort, and it only supports sorting on a single indexed key at a time. Seriously, I had to dig up and read the Chrome source code to figure out how to specify the sort order of a cursor (Hint: It's a string, like 'next', 'prev', not an IDBCursorDirection as the MDN docs mention but don't describe). Don't even bother asking about aggregates, projections, etc.
When I read the linked document, I couldn't help but think - honestly, they're calling being able to change table and index names a headline 2.0 feature? How about at least documenting sorting in queries? Much less supporting querying on multiple fields, on non-indexed fields, using AND and OR, etc. This feels like a 0.2 product to me.