replikativ / datahike

A fast, immutable, distributed & compositional Datalog engine for everyone.
https://datahike.io
Eclipse Public License 1.0
1.63k stars 97 forks source link

Can't create/open DB in Web Worker #391

Open MarkusH14 opened 3 years ago

MarkusH14 commented 3 years ago

I tried out the IndexedDB implementation and attempted to use it from a WebWorker. However, Datahike never finds the DB. My assumption is that konserve uses js/window.indexedDB which is not available in a WebWorker context. Replacing it with js/self.indexedDB or js/indexedDB could be enough to solve this.

whilo commented 3 years ago

@MarkusH14 Thanks for reporting this, I did not know about thi. @groundedSAGE we should keep this in mind when we port the indexedDB backend now.