I'm writing some python code with the sqlite3 package.
I want to put some SQL code into a string literal.
As I found here, Python supports Injections with markup and coding assistance for several languages, including SQL:
(such as HTML, CSS, XML, SQL, RegExp, etc.)
Sadly, when I want to try this feature, I found support for several languages like HTML or JQL, but I'm looking for SQL.
According to this post, it should be available since Pycharm 3.0.
Is there any way to get SQL Language injections with markup and coding assistance running?
I found a solution to this problem after long search:
Install the plugin Database Navigator.
(File->Settings->Plugins->Browse repositories->search for Database Navigator)
This will provide you with support for several SQL dialects including sqlite.
Sadly code-completion features don't support upper-case.
This is how the SQL support looks like - first line in proper uppercase, second line as with autocomplete-suggestion in lowercase
EDIT:
I could also solve this problem by changing the language settings for SQL:
(File->Settings->Editor->CodeStyle->SQL->enable Case, set uppercase where you wish to)
SQL injections are available only in PyCharm Pro version