HomePhabricator
Diffusion Comm 2b354c58f0f6

[web-db] initialize SQLite database

Description

[web-db] initialize SQLite database

Summary:
Creating sql.js object which is using SQLite wasm file.

Depends on D6992

Test Plan:
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

Reviewers: michal, tomek

Reviewed By: tomek

Subscribers: ashoat, atul

Differential Revision: https://phab.comm.dev/D6993

Details

Provenance
kamilAuthored on Mar 7 2023, 9:23 AM
Reviewer
tomek
Differential Revision
D6993: [web-db] initialize SQLite database
Parents
rCOMM88db3ac63232: [web-db] Use unique filename for each prod `sql-wasm.wasm` asset
Branches
Unknown
Tags
Unknown