![]() You might have seen a yellow bulb icon in the editor. Show intention actions: Opt+Enter/Alt+Enter Set up a query suggestion list, choose how to view query results, choose how to show errors, and much more. Statements that you are going to execute are highlighted in a query editor.īy the way, you can customize query execution settings by clicking the Сustomize link. It always contains the option to run all the statements. If there are several statements, a list of suggestions appears and you can choose which one to execute. ![]() Press Cmd/Ctrl+Enter.ĭataGrip executes the whole statement or only the selection if you’ve highlighted a fragment of code. It can be a subquery or a group of statements. Execute statement: Cmd/Ctrl+EnterĬlick the statement or select the fragment of code that you want to execute. With that in mind, we’ve put together a list of our top-10 most useful DataGrip shortcuts. But they are not always easy to remember. They make coding faster and more efficient. Set the maximum number of elements on one line.Ĭhop if long: move each value to a new line if the text exceeds the configured line length.We love shortcuts. The Place comma option works only if the Wrap subqueries option in the WITH clause section is set to Chop or Chop if long. The In the middle option joins two lines of code on one line. To configure the line length, open settings Control+Alt+S, navigate to Editor | Code Style, and type the necessary length in the Hard wrap at N columns field. Wrap if long: break a section of text into lines so that each line fits the configured line length. Under elements: place the closing parenthesis under aligned elements of a clause.Ĭhop if long: move each value to a new line if the text exceeds the configured line length. Under opening: place the closing parenthesis under the opening parenthesis. To begin: move the closing parenthesis to a new line with the last element of a clause. Wrapped indented: add an indent and move all members of the clause to a new line.Ĭhange the position of the closing parenthesis.Īt the end: place the closing parenthesis at the same line with the last element of a clause. ![]() Wrapped aligned: align and move all members of the clause to a new line. Wrapped unindented: move all members of the clause to a new line without adding an indent. Same line aligned: align all members of the clause, keep the first member on the same line with a parenthesis. Select On the same line to keep the opening parenthesis on the line with the keyword.Ĭhange the position of elements in relation to the opening parenthesis. Move clause elements that follow VALUES on a new line.Īlign or indent the opening parenthesis under the first keyword on the line. ![]() The As in common option means that the behavior of the selected option must duplicate the behavior of the analogous option in the Common section on the Queries tab. Move clause elements that follow INTO on a new line. Move INTO and clause elements that follow INTO on a new line. Move all section elements under the section main keyword (a header). Keep section elements under section header To enable this option only for subqueries, select Subqueries only. The length of a statement that will be collapsed is determined automatically by DataGrip. If you want to disable a new line after the comma when the To begin option is enabled, clear the Line breaks checkbox on the Wrapping tab. This option works only if you have more than three cases in a single context. The Auto option will move the third occurrence of the comma to the beginning. For example, you have three occurrences of a comma: two commas go at the beginning, one comma is at the end. The Auto option analyzes the surrounding context and calculates the most suitable place for a comma. Move a comma ( ,) to the beginning ( To begin) or to the end ( To end) of a code line. Move clause elements to a new line ( New line) or leave them on the same line ( Same line).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |