-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement set_client_data() [WPB-10919] #757
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #757 +/- ##
==========================================
- Coverage 72.39% 72.19% -0.21%
==========================================
Files 104 106 +2
Lines 19650 19709 +59
==========================================
+ Hits 14225 14228 +3
- Misses 5425 5481 +56
Continue to review full report in Codecov by Sentry.
|
Preparation for the set client data API (WPB-10919)
Preparation for the set client data API (WPB-10919)
These functions were previously unimplemented. There is no reason to leave it this way, since we can provide meaningful implementations for unique entities.
Preparation for the set client data API (WPB-10919)
Part of WPB-10919.
And in JVM wrapper. Part of WPB-10919.
c0fa4ad
to
942ff79
Compare
e7baa2b
to
c02f4de
Compare
Part of WPB-10919.
c02f4de
to
8ac1aff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had some questions, but I believe this should be good to go.
@@ -0,0 +1,4 @@ | |||
CREATE TABLE consumer_data ( | |||
id INTEGER PRIMARY KEY CHECK ( id = 0 ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to enforce that id
is only ever equal to 0. Is this to enforce that there is only ever one row in the table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly. This pattern can also be seen in other tables where we only ever expect one record, such as e2ei_acme_ca
.
(identifier_16, ProteusPrekey), | ||
(identifier_17, ProteusIdentity), | ||
(identifier_18, ProteusSession) | ||
(identifier_17, ProteusPrekey), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how these identifiers are used. Are these identifiers persisted at all? Can anything go wrong by moving identifier_16
from ProteusPrekey
to ConsumerData
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These identifiers are merely used to hold the data from the in-memory cache before it is committed. So it doesn't matter what their name is/was at all.
If we can create them internally in the macro instead of passing them in, I would like doing so!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating idents like this within a macro is tricky but not impossible.
In the future, it will be easier: combine the ${index()}
metafunction with the paste!
macro and we should be able to generate all these idents automatically.
For now, ${index()}
is still not stable, so you have to use recursive macro tricks to build up a unary number for each index and then count how many symbols appear in that number. This approach is complicated and opaque enough I'd recommend not reworking the existing macro until ${index()}
stabilizes.
What's new in this PR
See title and corresponding Jira item
PR Submission Checklist for internal contributors
SQPIT-764
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.