PyTd icon indicating copy to clipboard operation
PyTd copied to clipboard

SQL parameters

Open dclong opened this issue 8 years ago • 2 comments

The need to escape $ sign has caused confusions. Why not enforce parameters to be of the form ${param} and drop the need to escape $ sign?

dclong avatar Apr 12 '17 16:04 dclong

Its a good suggestion. Python Template strings are leveraged for this feature, and that is how it behaves.

escheie avatar Apr 13 '17 20:04 escheie

I think the template strings causes brings more confusions than convenience. It's common for users to have dollar signs in strings or passwords. The needs to escape $ just make things complicated. I some times run parameterized SQL code in a SQL IDE with parameters manually replaced (for testing purposes). If there are $ signs in the SQL code, then unfortunately I have escape and unescape them every time. I think it's quite easy to implement a customized template for SQL.

dclong avatar May 10 '17 15:05 dclong