fixed recent bug in count

This commit is contained in:
mdipierro
2012-07-14 17:55:25 -05:00
parent be3a091002
commit 842fb69dde
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-07-14 17:50:45) dev
Version 2.00.0 (2012-07-14 17:55:21) dev
+2 -1
View File
@@ -959,7 +959,8 @@ class BaseAdapter(ConnectionPool):
return 'UPPER(%s)' % self.expand(first)
def COUNT(self, first, distinct=None):
return 'COUNT()' if not distinct else 'COUNT(DISTINCT %s)' % self.expand(first)
return ('COUNT(%s)' if not distinct else 'COUNT(DISTINCT %s)') \
% self.expand(first)
def EXTRACT(self, first, what):
return "EXTRACT(%s FROM %s)" % (what, self.expand(first))