Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Jan 23, 2025
1 parent b2b4049 commit 7dee7d2
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 @@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"slices"
"strconv"
"strings"
"sync"

Expand All @@ -17,7 +18,7 @@ func EscapeName(name string) string {
_, name = stringutil.EscapeSpaces(strings.ToLower(name))

// Does the column name start with a number? If so, let's prefix `col_` to the column name.
if name[0] >= '0' && name[0] <= '9' {
if _, err := strconv.Atoi(string(name[0])); err == nil {
name = "col_" + name
}

Expand Down

0 comments on commit 7dee7d2

Please sign in to comment.