Page MenuHomePhabricator

[lib][native] remove code duplication from `processDBStoreOperations`
ClosedPublic

Authored by kamil on Aug 19 2024, 5:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 25, 1:30 AM
Unknown Object (File)
Wed, Sep 25, 1:30 AM
Unknown Object (File)
Wed, Sep 25, 12:26 AM
Unknown Object (File)
Thu, Sep 12, 2:20 AM
Unknown Object (File)
Wed, Sep 11, 9:26 AM
Unknown Object (File)
Mon, Sep 9, 11:59 AM
Unknown Object (File)
Sun, Sep 8, 3:34 AM
Unknown Object (File)
Sat, Sep 7, 9:43 AM
Subscribers

Details

Summary

Cleaning this tp reduce code duplication and simplify logic

Test Plan

Play with app and make sure ops are processed and results are persisted.

Diff Detail

Repository
rCOMM Comm
Branch
enable-db-publish
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Aug 19 2024, 6:08 AM
tomek added inline comments.
web/database/sqlite-api.js
199

We were checking the drafts differently from the other ops. Are you sure the new logic is equivalent?

This revision is now accepted and ready to land.Aug 20 2024, 1:39 AM
web/database/sqlite-api.js
199

Yes, this line is different because drafts are not converted and can be nullable.

In the new code, this condition is inverted, we check if there is any field that exists and has a length higher than 0 so this should remain unchanged.