classes (e.g. fixes func.text()). [ticket:1798]
easier to produce specific subclasses of these which work in
alias/subquery situations.
+ - func.XXX() doesn't inadvertently resolve to non-Function
+ classes (e.g. fixes func.text()). [ticket:1798]
+
- engines
- Fixed building the C extensions on Python 2.4. [ticket:1781]
if functions is None:
from sqlalchemy.sql import functions
func = getattr(functions, self.__names[-1].lower(), None)
- if func is not None:
+ if func is not None and \
+ isinstance(func, type) and \
+ issubclass(func, Function):
return func(*c, **o)
return Function(
('random', oracle.dialect())
]:
self.assert_compile(func.random(), ret, dialect=dialect)
-
+
+ def test_namespacing_conflicts(self):
+ self.assert_compile(func.text('foo'), 'text(:text_1)')
+
def test_generic_count(self):
assert isinstance(func.count().type, sqltypes.Integer)