- changed status to resolved
expression-time autogenned bindparams() should be replaced with a literal() construct, becomes bindparam at compile time
the idea is all the expression constructs that produce bindparam() objects would produce a literal() construct instead - the production of a bind parameter key and all would occur at compilation time.
this would allow dialects to choose which literal expressions should be embedded and which should become bind parameters, and would also push the generation of the "name" of the bindparam solely into the compilation phase, thus reducing the steps needed to created the name. we could even offer "no bind params" mode which embeds escaped literals if we felt like doing that.
it also allows us to chuck the "unique=True" flag on bindparam which is not very useful to the outside world, further simplifying internals.
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.4.xx (automated comment)
- Log in to comment
we've got this now...the literal() function is there as always, produces the bind param with unique=True, and the name is totally generated within the compile step. having it as a bind with a unique flag makes it straightforward to compare binds in the case of conflicting names and such.