5 ms·
not sure how useful this is, is the database stored in memory? how is it persistent? also non-blocking access is key otherwise you can easily freeze the UI.
by xxiao 15y ago
not sure how useful this is, is the database stored in memory? how is it persistent?
also non-blocking access is key otherwise you can easily freeze the UI.
- devongovett 15y agoI think it's memory for now, but I'm hoping for an IndexedDB backend as a polyfill for WebSQL. As for non-blocking... that's what Web Workers are for :)
- baq 15y agogreat for teaching SQL, perhaps? super easy example queries, etc.
- hogu 15y agoin memory data bases can be very useful! they allow you to slice and dice and aggregate data without you having to write the logic to do that yourself. I'm guessing this is in memory, the main purpose would be for you to use sqlite in the browser since node already has a sqlite driver, as such, IO blocking is not an issue because there is no IO, it can block the same way that cpu intensive code can block however
- oscilloscope 15y agoYou can avoid blocking by running SQL.js in a Web Worker.
- spin 15y agoActually, I'd love to be able to write SELECT queries in Javascript that were identical to the queries that I write on the server. Yeah, the data comes from an AJAX-JSON call, but then I deal with it exactly the same. I'd love that.