Adapt SQL dialect settings for the Database Tool
Answered
I am using the database tools and SQL plugin (Version 172.3544.35) from IntelliJ IDEA 2017.2.1 Ultimate mainly with Postgres and MySQL databases. I am aware how to define the dialect used in SQL files and database consoles, but I could not yet find any options for adapting the dialect and its code completion for my needs. For instance I prefer not to have all column names enclosed in backticks, as this reduces readability. Is there a way to turn this off?
Thanks
Please sign in to leave a comment.
Hello Stefan,
You can control quotation with the Settings(Preferences) | Editor | Code Style | SQL | General -> Identifiers quotation option. Note that IDE adds quotation for identifier when it is required by grammar/database options.
If the issue remains, please provide the example: source code, steps to reproduce and expected/actual behavior. Please also attach Details output from Test Connection button for the Data Source. Thanks.
Hello,
sorry for my late reply. Although I meanwhile got used to it somehow, I still would like to get rid of the identifier quotation for MySQL. The official MySQL documentation states that
An identifier may be quoted or unquoted. If an identifier contains special characters or is a reserved word, you must quote it whenever you refer to it.
(Ref: https://dev.mysql.com/doc/refman/5.7/en/identifiers.html)
My identifiers do not contain special characters or reserved keywords. I did set the quotation to off in the SQL style settings. The identifier quotation is set to unquote.
Now the setting obviously gets overridden, because any auto completed identifier is put into back tick quotation. Is there any way how I can disable this feature in the database or grammar options? I could not find it.
Thank you very much.