custom op() has equal precedence to the comma operator
Issue #2537
resolved
from sqlalchemy import *
from sqlalchemy.sql import column
print func.xyz(column('5').op('bar')('bat'))
output:
xyz(("5" bar :5_1))
a patch which adjusts operator precedence rules to put "comma" below "smallest" is attached for evaluation, not sure if this is the best approach.
it's also possible to allow op() to accept a precedence argument.
Comments (4)
-
reporter -
reporter second patch refines custom operators into a new object type, as well as modifies the dispatch system in CompareMixin to handle it. simplifies the compiler a slight bit and adds room in for more operator expansion.
-
reporter - changed status to resolved
-
reporter - removed milestone
Removing milestone: 0.8.0b1 (automated comment)
- Log in to comment
workaround: