Mo/feat/custom notify query#4011
Conversation
|
|
Is there a possibility to get his into upstream? as maintaining a fork of sqldelight seems quite expensive long term |
doing this feature as part of sqldelight code generation gives us the benefit of some stuff that the lib offers (like it will automatically group up updates from transactions to after it commits) without the need for us to implement it manually I raised an issue to get their feedback but got no response; however, the code needed to add this feature is not that complicated and can be easily maintained, plus it can be enabled/disabled with one flag, making switching back to upstream quite ez |



PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Issues
in the current model sqldelight
.asFlow()from select queries will emit an update for any mutaion select that changes any table in the select without control of wither this mutaion need to update the flow of notfor example
the select will update even tho the conversaiton is not related and there is 0 data change for the 'cool_boiz' conv
Causes (Optional)
this is how it works with sqldelight
Solutions
fork sqldelight and add a feature where you can have annotaions in a comment inside the .sq file, those annotaions will resolve to a custom flow listner that follow the annotaions
How it works:
@CustomKeytells a query which keys to listen for@NotifyCustomKeytells a mutation which keys to notify after it runs:conversation_idget resolved from the actual arguments at runtime, soconversation_:conversation_idbecomes something likeconversation_conv123This behavior can be configured at compile time so we can adapt it only in internal apps first
what i am looking for in this PR is to start the conversation if this is something we want to adapt
Dependencies (Optional)
If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.
Needs releases with:
Testing
Test Coverage (Optional)
How to Test
Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.
Notes (Optional)
Specify here any other facts that you think are important for this issue.
Attachments (Optional)
Attachments like images, videos, etc. (drag and drop in the text box)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.