Closed nolanlawson closed 9 years ago
I've thought about implementing this, but I can't find a way to get a list of websql databases:
Other ideas welcome, because without one, this can't move forward.
Yeah, I even looked at the Chrome Dev Tools source code and couldn't figure out how they enumerate the WebSQL databases.
Not a big deal, since most people will be debugging in either Chrome or Firefox anyway.
It might be possible to wrap the window.openDatabase()
function in the extension on loading every page (also when the panel itself isn't active), that way as long as the extension was installed when the DB was opened at least once, it would be there. Performance + the need to check if a database hasn't been destroyed in the meantime are pretty major disadvantages though...
See responses here: https://twitter.com/nolanlawson/status/528954085131960320
So it might be possible!
Ah okay, apparently only in Dev Tools extensions.
Another option: Making the user install a small executable that handles reading the sqlite files from disk, and passes the info on using stdout. Then use the native messaging API.
I ran into this. As an intermediary step, could you notify the user? Something as simple as 'WebSQL databases are currently unsupported by pouchdb-inspector' would help save some time :)
@tlvince It's already in the first paragraph of the README.md file. I've now also added a notification to the Chrome web store page.
Since there seems to be no solution that's really workable, I'm going to close this. If someone wants to work on something using one of the above hacks I would consider merging it, but I don't think it's worth the effort myself.
E.g. at http://npm-browser.com, where we prefer WebSQL to IndexedDB, nothing shows up. It works in the Firefox add-on, though.