From a3c1fda7575a4b624bd26aadc9040200c262481d Mon Sep 17 00:00:00 2001 From: Jason Seriff Date: Tue, 10 Nov 2015 14:51:16 -0600 Subject: [PATCH] Modify count regex to match parenthesis instead of starting a capture. Fixes #679 --- scope_private.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope_private.go b/scope_private.go index 1c6e84b1..d5aacfdb 100644 --- a/scope_private.go +++ b/scope_private.go @@ -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 {