Merge pull request #720 from jseriff/master

Modify count detection regex to match parenthesis instead of starting a capture.
This commit is contained in:
Jinzhu 2015-11-16 11:18:52 +08:00
commit edee5f5b75
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ func (scope *Scope) whereSql() (sql string) {
return
}
var hasCountRegexp = regexp.MustCompile(`(?i)count(.+)`)
var hasCountRegexp = regexp.MustCompile(`(?i)count\(.+\)`)
func (scope *Scope) selectSql() string {
if len(scope.Search.selects) == 0 {