Closed zzzeek closed 6 years ago
Original comment by Michael Bayer (Bitbucket: zzzeek, GitHub: zzzeek):
hey, nice work figuring this out, the execution chain is def. a little squirrely with regards to bind params. anyway if you look at changeset:1808 youll see how i adapted the idea, i took the opportunity to pare down ansisql.py from some old stuff a little bit and generally simplified how it transmits the ordering of the bind parameters to the ClauseParameters
object.
Original comment by Anonymous:
patch
Original comment by Anonymous:
test case
Originally reported by: Anonymous
Using a bound parameter more than once in a select fails when using a paramstyle of 'qmark'. Attached is a test case. Also attached is a hack to the get_params method to retain the full list of parameters.
The real problem is sql.ClauseParameters doesn't allow duplicated keys. Maybe it should have an append method that get_params() would use instead of set_parameter().
--Bill