Page MenuHomePhabricator

[web-db] choose storage engine depending on whether database is supported or not

Authored by kamil on Apr 27 2023, 7:47 AM.
Referenced Files
Unknown Object (File)
Mon, May 22, 9:11 AM
Unknown Object (File)
Sun, May 21, 9:47 AM
Unknown Object (File)
Thu, May 11, 6:16 PM
Unknown Object (File)
Thu, May 11, 2:17 AM
Unknown Object (File)
May 6 2023, 4:51 PM
Unknown Object (File)
May 3 2023, 4:40 PM
Unknown Object (File)
May 1 2023, 4:40 PM



Conditionally use default persist storage API or database depending on whether database is supported or not.

Depends on D7666

Test Plan

Switch to commReduxStorageEngine and test if it works for not supported database

Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Apr 27 2023, 8:00 AM

Wondering if this is the best solution. How about having two separate storage engines, one with only db and one with redux storage? Then we could conditionally set one or the other, but each of them would be a lot simpler.

This revision is now accepted and ready to land.Apr 28 2023, 4:37 AM
3 ↗(On Diff #25853)

Is this the right import? Do we have to include index in the path?

3 ↗(On Diff #25853)

We have an ESLint rule that forces this. It can be ignored, but generally prefer to use index.js instead. This is the same import path we use in web/root.js currently