text() converted to a bind param

Issue #962 resolved
jek created an issue
>>> print text('NULL')
NULL
>>> print cast(text('NULL'), Integer).compile(e)
CAST(? AS INTEGER)
>>> print t.c.name.like(text("'foo%'"))
parents.name LIKE 'foo%'
>>> print t.c.name.startswith(text("'foo'"))
parents.name LIKE ? || ?

That cast comes up in the in_ implementation; a fix should get firebird and maxdb working.

Comments (3)

  1. Mike Bayer repo owner

    as a side note, i thought we did this in #475 but apparently we make an exception when the incoming operand is a non-ClauseElement and we just concatenate the '%' to the string in python (this is about to change in the next rev).

  2. Log in to comment