Skip to content

Commit

Permalink
Update comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Jan 23, 2025
1 parent b03cdff commit 4560eac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/typing/columns/columns.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ import (
"github.com/artie-labs/transfer/lib/typing"
)

// EscapeName - will lowercase columns and escape spaces.
func EscapeName(name string) string {
// Lowercasing and escaping spaces.
_, name = stringutil.EscapeSpaces(strings.ToLower(name))

// Does the column name start with a number? If so, let's prefix `col_` to the column name.
// We're doing this most databases do not allow column names to start with a number.
if _, err := strconv.Atoi(string(name[0])); err == nil {
name = "col_" + name
}
Expand Down

0 comments on commit 4560eac

Please sign in to comment.