cleanly upgrade the type of bindparam() with a null type
Issue #2850
resolved
bp = bindparam("somevalue")
stmt = test_table.update().values(avalue=bp)
compiled = stmt.compile()
eq_(bp.type._type_affinity, types.NullType)
eq_(compiled.binds['somevalue']('somevalue').type._type_affinity, MyCustomType)
# additionally:
bp = bindparam("foo")
expr = column("foo", MyFoobarType) + bp
assert bp.type._type_affinity is types.NullType
assert expr.right.type._type_affinity is MyFoobarType
Comments (3)
-
reporter -
reporter - changed status to resolved
-
reporter - removed milestone
Removing milestone: 0.9.0 (automated comment)
- Log in to comment
we're looking here to _clone the bindparam() so that we don't need to mutate in place.