Merge pull request #672 from ivpusic/master

do not execute buildSelectQuery twice
This commit is contained in:
Jinzhu 2015-09-28 10:09:44 +08:00
commit 00fe20f8a8
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ func (scope *Scope) selectSql() string {
} }
sql := scope.buildSelectQuery(scope.Search.selects) sql := scope.buildSelectQuery(scope.Search.selects)
scope.Search.countingQuery = (len(scope.Search.group) == 0) && hasCountRegexp.MatchString(sql) scope.Search.countingQuery = (len(scope.Search.group) == 0) && hasCountRegexp.MatchString(sql)
return scope.buildSelectQuery(scope.Search.selects) return sql
} }
func (scope *Scope) orderSql() string { func (scope *Scope) orderSql() string {