Skip to content

Commit

Permalink
Add more ANSI reserved keywords to escape.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Jun 10, 2023
1 parent 591d726 commit 0f4ac4b
Showing 1 changed file with 58 additions and 1 deletion.
59 changes: 58 additions & 1 deletion lib/config/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,66 @@ const (
BigQueryTempTableTTL = 6 * time.Hour
)

// ReservedKeywords is populated from: https://docs.snowflake.com/en/sql-reference/reserved-keywords
// We are doing only the column names that are reserved by ANSI.
var ReservedKeywords = []string{
"start",
"all",
"alter",
"and",
"any",
"as",
"between",
"by",
"case",
"cast",
"check",
"column",
"connect",
"create",
"current",
"delete",
"distinct",
"drop",
"else",
"exists",
"following",
"for",
"from",
"grant",
"group",
"having",
"in",
"insert",
"intersect",
"into",
"is",
"like",
"not",
"null",
"of",
"on",
"or",
"order",
"revoke",
"row",
"rows",
"sample",
"select",
"set",
"some",
"start",
"table",
"tablesample",
"then",
"to",
"trigger",
"union",
"unique",
"update",
"values",
"whenever",
"where",
"with",
}

// ExporterKind is used for the Telemetry package
Expand Down

0 comments on commit 0f4ac4b

Please sign in to comment.