Cannot use repeated bindparams with paramstyle qmark

Issue #280 resolved
Former user created an issue

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

Comments (3)

  1. Mike Bayer repo owner

    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.

  2. Log in to comment