indexeddbshim / IndexedDBShim

A polyfill for IndexedDB using WebSql
Other
968 stars 191 forks source link

Reading Firefox IndexedDB files with Node.js #377

Closed youk closed 1 year ago

youk commented 1 year ago

Is it compatible with IndexedDB files from Firefox when used in Node.js? I can open corresponding .sqlite files, but the object stores present in database aren't listed:

let req = indexedDB.open('test.sqlite')
req.onsuccess = (event) => {
  let db = event.target.result
  console.log(`
    Opened database: ${db.name}
    Version: ${db.version}
    Object stores: ${Array.from(db.objectStoreNames)}
  `)
}

I verified that the database file is ok. sqlite3 CLI shows the object stores (select * from object_store).

IndexedDBShim: 12.0.0 Node.js: 20.8.0

brettz9 commented 1 year ago

No, it's our own custom SQLite format. It'd be a nice goal to support it if there were browser parity in the format of these files, but even if there was, we'd need to be able to understand the format. Firefox appears to save the data as binary blobs, for example, whereas ours saves serialized typeson for values.

youk commented 1 year ago

Got it. Thanks.