Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed May 2, 2024
1 parent 05c4e39 commit 3339aef
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/sql/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"log/slog"
"slices"
"strconv"
"strings"

"github.com/artie-labs/transfer/lib/config/constants"
Expand Down Expand Up @@ -52,14 +51,7 @@ type SnowflakeDialect struct {
}

func (sd SnowflakeDialect) legacyNeedsEscaping(name string) bool {
if slices.Contains(constants.ReservedKeywords, name) || strings.Contains(name, ":") {
return true
}
// If it still doesn't need to be escaped, we should check if it's a number.
if _, err := strconv.Atoi(name); err == nil {
return true
}
return false
return slices.Contains(constants.ReservedKeywords, name) || strings.Contains(name, ":")
}

func (sd SnowflakeDialect) QuoteIdentifier(identifier string) string {
Expand Down

0 comments on commit 3339aef

Please sign in to comment.