Creating sql.js object which is using SQLite wasm file.
Depends on D6992
Differential D6993
[web-db] initialize SQLite database kamil on Mar 7 2023, 9:28 AM. Authored by Tags None Referenced Files
Details
Creating sql.js object which is using SQLite wasm file. Depends on D6992 Run this code: declare var sqljsFilename: string; const rawWebDbWorker = new SharedWorker('/worker/database'); const webDBWorker = new WorkerConnectionProxy( rawWebDbWorker.port, error => { console.error(error); }, ); const origin = window.location.origin; await webDBWorker.scheduleOnWorker({ type: workerRequestMessageTypes.INIT, sqljsFilePath: `${origin}/compiled/webworkers`, sqljsFilename, }); And check if db version was properly logged on web and desktop
Diff Detail
Event Timeline
Comment Actions Do we know how this diff corresponds to https://linear.app/comm/issue/ENG-3322/fix-stale-cache-error-for-olmwasm#comment-d1aabe3d? Maybe this will somehow improve the experience about the path's configuration?
Comment Actions Example usage is in the test plan, unfortunately, it can not be done as elegantly as in olm case - where both web and .wasm file is hosted from the same place. The worker file is hosted via different endpoint so using a relative path is not possible. Comment Actions Addressed in D7092
|