From ae17bf95734284f0f0818e27422ae450ac653731 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 14 Aug 2012 17:24:57 -0400 Subject: - 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. --- lib/sqlalchemy/dialects/postgresql/psycopg2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/dialects/postgresql/psycopg2.py') 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('%', '%%') -- cgit v1.2.1