mirror of https://github.com/go-gorm/gorm.git
Modify count regex to match parenthesis instead of starting a capture. Fixes #679
This commit is contained in:
parent
611e613459
commit
a3c1fda757
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue