summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index 303a44552..d5fd3b6c5 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -1752,6 +1752,14 @@ class MySQLCompiler(ansisql.ANSICompiler):
# TODO: put whatever MySQL does for CAST here.
return self.process(cast.clause)
+ def get_select_precolumns(self, select):
+ if isinstance(select._distinct, basestring):
+ return select._distinct.upper() + " "
+ elif select._distinct:
+ return "DISTINCT "
+ else:
+ return ""
+
def for_update_clause(self, select):
if select.for_update == 'read':
return ' LOCK IN SHARE MODE'