Update scope.go

This commit is contained in:
Ivan Valkov 2017-07-03 10:05:01 +01:00 committed by GitHub
parent c05d72c879
commit fa2095429b

View File

@ -449,7 +449,7 @@ func (scope *Scope) callMethod(methodName string, reflectValue reflect.Value) {
var ( var (
columnRegexp = regexp.MustCompile("^[a-zA-Z\\d]+(\\.[a-zA-Z\\d]+)*$") // only match string like `name`, `users.name` columnRegexp = regexp.MustCompile("^[a-zA-Z\\d]+(\\.[a-zA-Z\\d]+)*$") // only match string like `name`, `users.name`
isNumberRegexp = regexp.MustCompile("^\\s*\\d+\\s*$") // match if string is number isNumberRegexp = regexp.MustCompile("^\\s*\\d+\\s*$") // match if string is number
comparisonRegexp = regexp.MustCompile("(?i) (=|<>|>|<|LIKE|IS|IN) ") comparisonRegexp = regexp.MustCompile("(?i) (=|<>|>|<|LIKE|IS|IN) ")
countingQueryRegexp = regexp.MustCompile("(?i)^count(.+)$") countingQueryRegexp = regexp.MustCompile("(?i)^count(.+)$")
) )