-
Notifications
You must be signed in to change notification settings - Fork 428
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
Prepared queries pubsub #3074
Prepared queries pubsub #3074
Conversation
… for mssql and mysql
prepared queries pubsub
- Unchanged behaviour without item ids - Slight changes if item ids are provided: - Results are fetched one by one - should be fast enough as there shouldn't be too many IDs and there is a way to limit this. - Results have the same order as item ids - this is more intuitive for the end user, XEP-0060 does not specify this - max_items with item ids is a combination not mentioned in the XEP, but still supported for completeness.
- Separate INSERT and SELECT to work on all DBs - SELECT the entire row as this query is already prepared and is not much more costly
- Insert parents one by one - Always delete old parents on update to prevent the corner case when all aprents are deleted.
Traverse nodes one by one - it might be slower, but complex collection structures shouldn't be used frequently.
Prepared queries for PubSub - part 2
Codecov Report
@@ Coverage Diff @@
## master #3074 +/- ##
==========================================
- Coverage 78.76% 78.70% -0.07%
==========================================
Files 378 377 -1
Lines 31102 31083 -19
==========================================
- Hits 24499 24465 -34
- Misses 6603 6618 +15
Continue to review full report at Codecov.
|
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.
Both pull requests to this branch were already approved.
My and @chrzaszcz collective effort of preparing SQL queries in
pubsub
modules.