- changed status to resolved
create "singleton bind param", distinguish from current bind parameter
Issue #327
resolved
this is an intuitive pattern that currently does not work:
s = table.select(and_(table.c.id==bindparam('id'), table.c.otherid==bindparam('id')))
s.execute(id=5)
because there are two separate BindParamClause
instances. The BindParamClause
that is implicitly generated in SQL construction should retain its current behavior, since it relies upon each separate bind param having its "key" modified at compilation time as well as the embedded "value". but the default bindparam
function should produce an immutable "singleton" BindParamClause
, perhaps by returning the same instance for the same key. the "singleton" bindparam should probably not accept a value. the "bindparam" that takes a value should be called something like value_bindparam().
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.4.0 (automated comment)
- Log in to comment
this was fixed in changeset:2373. its not a "singleton" bind param, its just bindparams that share a name.