summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2007-12-12 16:39:10 +0000
committerJason Kirtland <jek@discorporate.us>2007-12-12 16:39:10 +0000
commitbfb33f7959244e1ac15d3d713e0abbd49f7a5e31 (patch)
tree7beee70d15921c8ae50b87fc4d7518fff8cb7076 /lib/sqlalchemy/databases/mysql.py
parentf38e24e263a6589c65fc425df47070a3206f52c7 (diff)
downloadsqlalchemy-bfb33f7959244e1ac15d3d713e0abbd49f7a5e31.tar.gz
- on mysql, emit inner joins as 'INNER JOIN ... ON' (for version 3.23)
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 742164412..ba0ad5e0a 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -1881,6 +1881,14 @@ class MySQLCompiler(compiler.DefaultCompiler):
else:
return ""
+ def visit_join(self, join, asfrom=False, **kwargs):
+ return ''.join(
+ (self.process(join.left, asfrom=True),
+ (join.isouter and " LEFT OUTER JOIN " or " INNER JOIN "),
+ self.process(join.right, asfrom=True),
+ " ON ",
+ self.process(join.onclause)))
+
def for_update_clause(self, select):
if select.for_update == 'read':
return ' LOCK IN SHARE MODE'