convert distinct to groupby when not supported
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.9 (2012-09-16 15:38:27) stable
|
Version 2.0.9 (2012-09-16 15:51:47) stable
|
||||||
|
|||||||
@@ -1457,6 +1457,8 @@ class BaseAdapter(ConnectionPool):
|
|||||||
having = args_get('having', False)
|
having = args_get('having', False)
|
||||||
limitby = args_get('limitby', False)
|
limitby = args_get('limitby', False)
|
||||||
for_update = args_get('for_update', False)
|
for_update = args_get('for_update', False)
|
||||||
|
if not distinct in (True,False) and not groupby:
|
||||||
|
distinct, groupby = False, distinct
|
||||||
if self.can_select_for_update is False and for_update is True:
|
if self.can_select_for_update is False and for_update is True:
|
||||||
raise SyntaxError, 'invalid select attribute: for_update'
|
raise SyntaxError, 'invalid select attribute: for_update'
|
||||||
if distinct is True:
|
if distinct is True:
|
||||||
|
|||||||
Reference in New Issue
Block a user