forked from mirror/gorm
Merge pull request #720 from jseriff/master
Modify count detection regex to match parenthesis instead of starting a capture.
This commit is contained in:
commit
edee5f5b75
|
@ -208,7 +208,7 @@ func (scope *Scope) whereSql() (sql string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var hasCountRegexp = regexp.MustCompile(`(?i)count(.+)`)
|
var hasCountRegexp = regexp.MustCompile(`(?i)count\(.+\)`)
|
||||||
|
|
||||||
func (scope *Scope) selectSql() string {
|
func (scope *Scope) selectSql() string {
|
||||||
if len(scope.Search.selects) == 0 {
|
if len(scope.Search.selects) == 0 {
|
||||||
|
|
Loading…
Reference in New Issue