diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-14 13:47:58 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-14 13:47:58 -0400 |
commit | 05864ab8a6883cd286f27a05f045ef41a7327fcd (patch) | |
tree | 5bda84a6028168f0d0c6edf5a1f12df214acf095 /lib/sqlalchemy/dialects/postgresql/base.py | |
parent | 7ce34c2b34d7122f6972eaf900ba988c19a0bb98 (diff) | |
download | sqlalchemy-05864ab8a6883cd286f27a05f045ef41a7327fcd.tar.gz |
- fix concat() operator, tests
- [feature] Custom unary operators can now be
used by combining operators.custom_op() with
UnaryExpression().
- clean up the operator dispatch system and make it more consistent.
This does change the compiler contract for custom ops.
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index d779935ce..a9ff988e8 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -619,12 +619,12 @@ ischema_names = { class PGCompiler(compiler.SQLCompiler): - def visit_match_op(self, binary, **kw): + def visit_match_op_binary(self, binary, operator, **kw): return "%s @@ to_tsquery(%s)" % ( self.process(binary.left), self.process(binary.right)) - def visit_ilike_op(self, binary, **kw): + def visit_ilike_op_binary(self, binary, operator, **kw): escape = binary.modifiers.get("escape", None) return '%s ILIKE %s' % \ (self.process(binary.left), self.process(binary.right)) \ @@ -632,7 +632,7 @@ class PGCompiler(compiler.SQLCompiler): (' ESCAPE ' + self.render_literal_value(escape, None)) or '') - def visit_notilike_op(self, binary, **kw): + def visit_notilike_op_binary(self, binary, operator, **kw): escape = binary.modifiers.get("escape", None) return '%s NOT ILIKE %s' % \ (self.process(binary.left), self.process(binary.right)) \ |