Page MenuHomePhabricator

[SQLite] add methods to operate on `keyservers` table
ClosedPublic

Authored by kamil on Jan 22 2024, 3:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 4, 6:34 AM
Unknown Object (File)
Aug 5 2024, 12:24 PM
Unknown Object (File)
Aug 5 2024, 12:24 PM
Unknown Object (File)
Aug 5 2024, 12:24 PM
Unknown Object (File)
Jul 17 2024, 5:43 AM
Unknown Object (File)
Jul 13 2024, 5:52 PM
Unknown Object (File)
Jul 9 2024, 9:35 PM
Unknown Object (File)
Jul 4 2024, 5:44 AM

Details

Summary
  1. Representation of data row.
  2. Methods to modify the table.
  3. Emscripten bindings.

Note: This could heavily conflict with @marcin's work on deprecating sqlite_orm - we will coordinate to make this smooth and avoid blocking each other.

Depends on D10774

Test Plan

Calling those methods from JS and making sure it works.

Diff Detail

Repository
rCOMM Comm
Branch
publish-ks-sql-2
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jan 22 2024, 6:38 AM
kamil edited the summary of this revision. (Show Details)
native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
1341 ↗(On Diff #35951)

Wondering if method taking a vector of id's to remove multiple keyservers at once wouldn't be more practical. Actually this is what we do in the rest of the code.

I agree with @marcin

native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
986 ↗(On Diff #35951)

Can we remove this empty line?

native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
74 ↗(On Diff #35951)

Can we remove this empty line?

Before landing I think you should:

  1. Refactor removeKeyserver to removeKeyservers that takes std::vector<std::string> ids instead of std::string id. It is more practical and matches convention.
  2. Implement some unit tests for the KeyserverStore in the same manner that you did for other stores that have already migrated to the database on web.
This revision is now accepted and ready to land.Jan 23 2024, 12:44 AM

address review and implement tests