diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-14 17:24:57 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-14 17:24:57 -0400 |
commit | ae17bf95734284f0f0818e27422ae450ac653731 (patch) | |
tree | e3b9c050536e256c24fab9958a983bb43b6fb571 /lib/sqlalchemy/dialects/postgresql/psycopg2.py | |
parent | 48b99fc678da8cd0eeb559b3d9aba77a7d6b0ee1 (diff) | |
download | sqlalchemy-ae17bf95734284f0f0818e27422ae450ac653731.tar.gz |
- update all the visit_mod() functions with new naming scheme
- visit_mods all seemed to not propagate **kw down to process().
this is [ticket:2548] which may be backported to 0.7 pending
a test case to illustrate wrong behavior.
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/psycopg2.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/psycopg2.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index 8a4360b34..1b67a5521 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -257,8 +257,9 @@ class PGExecutionContext_psycopg2(PGExecutionContext): class PGCompiler_psycopg2(PGCompiler): - def visit_mod(self, binary, **kw): - return self.process(binary.left) + " %% " + self.process(binary.right) + def visit_mod_binary(self, binary, operator, **kw): + return self.process(binary.left, **kw) + " %% " + \ + self.process(binary.right, **kw) def post_process_text(self, text): return text.replace('%', '%%') |