Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is dialect in Phpstorm

What is dialect?

and how to use it and generate it?

The IDE editor validation keeps telling "SQL dialect is not configured"

I use PHP + MySql and PhpStorm 8 IDE

like image 578
Eslam Sameh Ahmed Avatar asked Dec 28 '14 09:12

Eslam Sameh Ahmed


2 Answers

For those who search where to define specific SQL dialects for a project or for some files go to Settings ⇒ Languages & Frameworks ⇒ SQL Dialects

There were a window like this one and a dropdown menu on the last column to set that : enter image description here

like image 124
onirix Avatar answered Oct 02 '22 08:10

onirix


A SQL dialect is a particular implementation of the SQL standard. Dialects differ from database to database. For instance, Oracle has no LIMIT clause, while MySql does. In order for PHPStorm to do code assist and syntax highlighting, you need to configure the dialect you use. If you do not specify a dialect, PHPStorm will use the Generic dialect:

This means that no particular dialect is specified. As a result, basic SQL92-based coding assistance is provided including completion and highlighting for SQL keywords, and table and column names. Syntax error highlighting is not available. So the file contents are always shown as syntactically correct. Also, code reformatting isn't possible.

Further reference:

  • https://www.jetbrains.com/phpstorm/help/sql-dialects.html
  • https://www.jetbrains.com/phpstorm/help/configuring-a-db-data-source.html

For an introduction to PHPStorm's DB feature, see

  • http://blog.jetbrains.com/webide/2012/11/sql-support-and-database-tools/
like image 32
Gordon Avatar answered Oct 02 '22 06:10

Gordon