DataGrip provides code completion based on the context and schema constraints, helping you write SQL code faster. Let’s have a look at the most important completion features.
General code completion
Code completion is automatic in DataGrip, but you can invoke it at any moment by pressing Ctrl+Space. It is context-aware, which means that it tries to suggest only the objects or keywords you may need in every particular moment.
Foreign key aware completion
The IDE can complete your statement in a
JOIN clause if the tables are connected with a foreign key.
Functions parameters info
DataGrip can tell you about names and types of parameters for functions and procedures as well.
INSERT statement completion
When you write
INSERTstatements, listing all the fields takes a lot of work. DataGrip completion can relieve you of this responsibility by generating the list automatically.
To assist you in inserting valid values, the IDE hints at the name and type of corresponding columns.
Hippy completion with Alt+/ completes words by matching the typed letters to the words in open files.
ALTER aware completion
When the query console contains a DDL statement with an
ALTER clause, code completion is aware of changes you have made in this DDL.
Camel case completion
If you have names in the
camelCase, just use the first letters of the words — all
you need will be completed. The same works for
Use built-in live templates to generate repetitive parts of SQL code, and create custom templates for even greater efficiency.