-
Notifications
You must be signed in to change notification settings - Fork 147
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
Runconfigs V2 - adds stability, removes complexity #3285
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Benchstat Geomean Results0.41% sec/op, -0.08% B/op, 0.00% allocs/op Benchstat results
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3285 +/- ##
==========================================
+ Coverage 24.61% 24.66% +0.04%
==========================================
Files 394 395 +1
Lines 45997 45867 -130
==========================================
- Hits 11323 11311 -12
+ Misses 33544 33435 -109
+ Partials 1130 1121 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
qb := NewSelectQueryBuilder("public", driver, subsetByForeignKeyConstraints, pageLimit) | ||
querymap := map[string]*sqlmanager_shared.SelectQuery{} | ||
for _, cfg := range runConfigs { | ||
query, _, pageQuery, isNotForeignKeySafe, err := qb.BuildQuery(cfg) |
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.
confused as to where the isNotForeignKeySafe
is defined.
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 should probably rename that. It really just tells me when a query is a subset query and needs to turn skip fk violations when inserting or updating. It gets determined when building the select query.
Simplifies run config and query builder logic.
For circular dependencies and subsets removes complicated logic around optimal path. Now it determines update configs based on tables nullable foreign keys. A separate update config is created for each nullable foreign key on the table.
Moves subset joining logic into run config builder because we create update configs for subset tables now. It computes the shortest path from every child table to all parent subsets. This reduces unnecessary and complicated joins