GoLand 2024.3 Help

User files

Enable the Database Tools and SQL plugin

This functionality relies on the Database Tools and SQL plugin, which is bundled and enabled in GoLand by default. If the relevant features are not available, make sure that you did not disable the plugin.

  1. Press Ctrl+Alt+S to open settings and then select Plugins.

  2. Open the Installed tab, find the Database Tools and SQL plugin, and select the checkbox next to the plugin name.

User files are the files that are stored on your machine or any other place you have access to. To work with them in GoLand, access the directory that contains them in the Project tool window .

You can view, edit, create, and delete the SQL files.

Create an SQL file

  1. In the Project tool window ( View | Tool Windows | Project) , right-click the directory in which you want to create an SQL file and select New | File.

  2. In the New File dialog, specify the filename with the SQL extension.

Managing files and directories

You can add directories and files to your project by attaching them to it in the Project tool window . The attached directories become associated with the project, GoLand indexes them and includes them into search, navigation, highlighting, and so on. You can exclude the attached directories and files from project, include them back, and physically delete them using the corresponding context menu actions.

Attach a directory with SQL files

  1. Click File | Open.

  2. Navigate to the folder that you want to attach.

  3. Click Open.

  4. In the Open Project dialog, click Attach.

Attach a directory to the project

Detach a directory with SQL files

  • In the Project tool window (View | Tool Windows | Project), right-click a directory and select Detach Directory.

    Detach a directory with SQL files

Run SQL files

SQL files are run against the selected databases or schemas using run configurations. To run an SQL file, you can either create a new run configuration, or edit an existing one.

For more information about running SQL files from your machine, refer to Run SQL files.

Configure a dialect for SQL files

For better coding assistance, assign an SQL dialect to an SQL file. An SQL dialect is a DBMS-specific version of SQL.

GoLand lets you specify the SQL dialect for an individual file or all SQL and DDL files that can be stored in a directory, in your project, or on your computer.

Specify a dialect for a single SQL file

  1. Click the dialect list, which is in the upper-right corner of the window.

  2. Select a dialect from the dialect list.

    Specify an SQL dialect

Specify a dialect for multiple SQL files

  1. Open settings by pressing Ctrl+Alt+S and navigate to Languages & Frameworks | SQL Dialects. .

  2. Click the Add button the Add button and select directories or files for which you want to change a dialect.

  3. Click Open.

  4. Click the SQL Dialect cell and select the necessary dialect.

  5. Apply changes and click OK.

Last modified: 04 December 2024