-
Notifications
You must be signed in to change notification settings - Fork 134
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
NEOS-1438 Destination option to skip foreign key constraint errors in sync #2665
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2665 +/- ##
==========================================
+ Coverage 36.48% 36.58% +0.09%
==========================================
Files 272 273 +1
Lines 25271 25441 +170
==========================================
+ Hits 9221 9307 +86
- Misses 14795 14872 +77
- Partials 1255 1262 +7 ☔ View full report in Codecov by Sentry. |
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.
LGTM, left a minor comment about a follow up we should do.
errorCount := 0 | ||
insertCount := 0 | ||
for _, row := range rows { | ||
insertQuery, err := querybuilder.BuildInsertQuery(s.driver, fmt.Sprintf("%s.%s", s.schema, s.table), columns, [][]any{row}, &s.onConflictDoNothing) |
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.
fmt.Sprintf("%s.%s", s.schema, s.table)
I know this gets fed into goqu and properly escaped, but what if the schema or table has a period in it? I'm guessing it doesnt know what to do. Anyways, idk if we are doing this anywhere but now that I'm hyper aware of special chars thought i'd point this out...
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.
Maybe in a follow up we should update those BuildInsertQuery
and BuildUpdateQuery
functions to call out schema and table as specific parameters so that we can use goqu to build them like goqu.T(table).Schema(schema)
so that it can handle the escaping for us.
No description provided.