Skip to content

Commit

Permalink
Merge pull request #438 from tablelandnetwork/bcalza/fixregex
Browse files Browse the repository at this point in the history
adds missing caret to regex
  • Loading branch information
brunocalza authored Jan 19, 2023
2 parents 93ff2ee + 0972b43 commit cd9f930
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/parsing/impl/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func New(systemTablePrefixes []string, opts ...parsing.Option) (parsing.SQLValid
}
}

tablePrefixRegex := "([A-Za-z]+[A-Za-z0-9_]*)"
tablePrefixRegex := "^([A-Za-z]+[A-Za-z0-9_]*)"
queryTableNameRegEx, _ := regexp.Compile(fmt.Sprintf("%s*_[0-9]+_[0-9]+$", tablePrefixRegex))
createTableNameRegEx, _ := regexp.Compile(fmt.Sprintf("%s*_[0-9]+$", tablePrefixRegex))

Expand Down

0 comments on commit cd9f930

Please sign in to comment.