How do you inject SQL into a Python string and get auto-complete in PyCharm?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
SQL language injection is supported starting with PyCharm 3.0 (it was not supported at the time this question was asked).
The details can be found at Using Language Injections.
回答2:
Several ways:
Alt+Enter on a string -> Inject language or reference -> choose needed SQL
Write a comment in that way: