From b2453ba7c98a6dfc066dec9c66eb5ffc9f9fac31 Mon Sep 17 00:00:00 2001 From: Nathan Villaescusa Date: Wed, 1 May 2024 13:25:48 -0700 Subject: [PATCH] Move symbolsToEscape --- lib/sql/dialect.go | 3 +++ lib/sql/escape.go | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sql/dialect.go b/lib/sql/dialect.go index b444e2401..4eee6297d 100644 --- a/lib/sql/dialect.go +++ b/lib/sql/dialect.go @@ -45,6 +45,9 @@ type SnowflakeDialect struct { UppercaseEscNames bool } +// symbolsToEscape are additional keywords that we need to escape +var symbolsToEscape = []string{":"} + func (sd SnowflakeDialect) NeedsEscaping(name string) bool { if sd.UppercaseEscNames { // If uppercaseEscNames is true then we will escape all identifiers that do not start with the Artie priefix. diff --git a/lib/sql/escape.go b/lib/sql/escape.go index f8d1e62dc..85a94589a 100644 --- a/lib/sql/escape.go +++ b/lib/sql/escape.go @@ -4,9 +4,6 @@ import ( "github.com/artie-labs/transfer/lib/config/constants" ) -// symbolsToEscape are additional keywords that we need to escape -var symbolsToEscape = []string{":"} - func EscapeNameIfNecessary(name string, uppercaseEscNames bool, destKind constants.DestinationKind) string { var dialect = dialectFor(destKind, uppercaseEscNames)