-
Notifications
You must be signed in to change notification settings - Fork 31
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
[mssql] Escape all columns that do not start with "__artie" #501
Conversation
@@ -25,7 +25,7 @@ func NeedsEscaping(name string, destKind constants.DestinationKind) bool { | |||
if destKind == constants.Redshift { | |||
reservedKeywords = constants.RedshiftReservedKeywords | |||
} else if destKind == constants.MSSQL { | |||
reservedKeywords = constants.MSSQLReservedKeywords | |||
return !strings.HasPrefix(name, constants.ArtiePrefix) |
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.
Why not just escape all?
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 wanted to but if we escape all columns we get test errors that say artie delete flag doesn't exist
.
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'm guessing there must be some places where we escape the column names and then check if the column names contain a specific value.
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.
That's a guardrail in dml/merge
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.
The comparison is running "__artie_deleted" == __artie_deleted
which will always equate to false
No description provided.