SQL PEP-249 named parameter support?
已回答
Howdy,
Does PyCharm support all the paramstyles (https://www.python.org/dev/peps/pep-0249/#paramstyle) of PEP-249? I've found references that it supports 'qmark' and 'numeric'.
I'm using MysqlDB which supports the 'format' paramstyle which results in the format codes ('%s', '%d',...) being flagged as errors in SQL strings.
Thank you,
Roy
请先登录再写评论。
Hello, Roy! Try to configure it in Settings| Tools | Database | User parameters (https://www.jetbrains.com/help/pycharm/user-parameters.html) and let me know if it doesn't help.
Roy, Thank you for asking this question. I had been trying to figure out how to do this for about a week now and just hadn't figured out the right words to use to ask.
Here is the expression I ended up with to allow format and pyformat params: %(\(.+?\))?[sd]