You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often we need a statement where only some bound parameters change with every use.
Currently we clear bindings every time we reset the bindings so we have to bind all parameters again after every usage.
This gets complicated if you want to pass the prepared statement to another function without all the parameters you want to use every time.
Maybe we could make clearing the bindings optional? Or does anyone has an idea for a nice interface which allows reusing the bindings?
I thought about adding a method .fix_parameters(n) which indicates to no longer modify/clear the first n parameters. There is no sqlite3 function for clearing a subset of all bound parameters, but we could probably emulate this.
The text was updated successfully, but these errors were encountered:
It is OK to rebind without clearing first. The only problem with it is that it can be confusing for your old bindings to still have an effect after calling reset.
Often we need a statement where only some bound parameters change with every use.
Currently we clear bindings every time we reset the bindings so we have to bind all parameters again after every usage.
This gets complicated if you want to pass the prepared statement to another function without all the parameters you want to use every time.
Maybe we could make clearing the bindings optional? Or does anyone has an idea for a nice interface which allows reusing the bindings?
I thought about adding a method
.fix_parameters(n)
which indicates to no longer modify/clear the firstn
parameters. There is nosqlite3
function for clearing a subset of all bound parameters, but we could probably emulate this.The text was updated successfully, but these errors were encountered: