use kwargs for bind params
Closed this issue · 3 comments
chadwhitacre commented
chadwhitacre commented
I really want this.
Changaco commented
I would rather pass nothing at all, pulling values directly from locals and globals instead. Unfortunately PEP 498 didn't take into account the need for escaping so we can't use f-strings for SQL.
Update on October 1st, 2019: It has occurred to me that we probably don't need any new special support in the interpreter to be able to automatically pull values from locals and globals, we should be able to walk up the stack and access the context of the calling function. However it probably wouldn't be very efficient, so we might as well just pass locals() as the query parameters.