Page MenuHomePhabricator

[sqlite] add methods to operate on integrity store table
ClosedPublic

Authored by will on Mar 11 2024, 6:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 7:27 AM
Unknown Object (File)
Fri, Nov 1, 8:42 PM
Unknown Object (File)
Fri, Nov 1, 8:39 PM
Unknown Object (File)
Fri, Nov 1, 8:14 PM
Unknown Object (File)
Oct 17 2024, 1:01 PM
Unknown Object (File)
Oct 17 2024, 1:01 PM
Unknown Object (File)
Oct 17 2024, 1:01 PM
Unknown Object (File)
Oct 3 2024, 12:35 AM
Subscribers

Details

Summary

Adds methods to operate on integrity store table

Depends on D11323

Test Plan

Successfully ran tests in communities-queries.test.js.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

will requested review of this revision.Mar 11 2024, 7:15 AM

Looks good, there is one problem with thread_hash type - but let's discuss this in D11247 and then you can just update the type here

lib/ops/integrity-store-ops.js
38 ↗(On Diff #37980)

why do we have to rename it?

native/cpp/CommonCpp/DatabaseManagers/entities/IntegrityThreadHash.h
11 ↗(On Diff #37980)

this couldn't be int - see my comment here: https://phab.comm.dev/D11247#inline-68347

web/database/queries/integrity-queries.test.js
39–41 ↗(On Diff #37980)

we have a bit different error handling now - see here

82–87 ↗(On Diff #37980)

I guess you can just do something like:

expect(threadHashesFromDB).toStrinctEqual({...TEST_THREAD_HASHES_1, ....TEST_THREAD_HASHES_UPDATE});

what do you think?

This revision is now accepted and ready to land.Mar 12 2024, 10:07 AM
native/ios/Comm.xcodeproj/project.pbxproj
139 ↗(On Diff #37980)

Usually when we see changes to project.pbxproj, we also expect to see some changes to a CMakeLists.txt on Android. Was this tested on Android? Are you sure we don't need to modify any CMakeLists.txt files?

will edited the summary of this revision. (Show Details)
will planned changes to this revision.Mar 14 2024, 9:24 PM
lib/ops/integrity-store-ops.js
38 ↗(On Diff #37980)

Mainly did this for consistency with the type IntegrityStoreOperation. This should've be done when it was first introduced. I'll rebase and remove the need for a rename.

native/ios/Comm.xcodeproj/project.pbxproj
139 ↗(On Diff #37980)

I was going off of the community and keyserver sqlite migration diffs and I don't think we made any changes there.

The CMakeLists.txt for android contains parent folders for mutual code for native:

../../cpp/CommonCpp/
../../cpp/CommonCpp/NativeModules
../../cpp/CommonCpp/NativeModules/InternalModules
../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities
../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities/BackupOperationsUtilities
../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities/DataStores
../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities/ThreadOperationsUtilities
../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities/MessageOperationsUtilities
../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs
../../cpp/CommonCpp/DatabaseManagers
../../cpp/CommonCpp/Notifications
../../cpp/CommonCpp/Notifications/BackgroundDataStorage

I tested on android and the app seems to be working, although I haven't thoroughly tested the database

This revision is now accepted and ready to land.Mar 18 2024, 9:19 PM
will marked an inline comment as done.Mar 18 2024, 9:23 PM
will added inline comments.
web/database/queries/integrity-queries.test.js
39–41 ↗(On Diff #37980)

Included in latest rebase

82–87 ↗(On Diff #37980)

Looks good. Included in latest rebase

will marked an inline comment as done.Mar 18 2024, 9:43 PM
will added inline comments.
native/cpp/CommonCpp/DatabaseManagers/entities/IntegrityThreadHash.h
11 ↗(On Diff #37980)

addressed in latest rebases