GoLand 2020.2 Help

Review changes in source code

Everything that you write in the editor is saved as the local version of the object source code. You can examine all changes that are not committed in the Database Changes tool window.

The Database Changes tool window displays changes in source code of objects before you commit them. GoLand tracks changes only for objects that store their source code in the database. For example, triggers, procedures, functions, views, and other objects.

The Database Changes Tool Window

See the diff between modified and stored versions

  • In the Database Changes, double-click any database object.

    See the diff between modified and stored versions
  • When you edit source code of any object, GoLand tracks changes and highlights them in the gutter. For example, add a comment line to a routine or a trigger function. The added line becomes highlighted. If you click the highlighted line in the gutter, a small toolbar is displayed with the Show Diff button. You can click the Show Diff button (the Show diff icon) to see the difference between the code that you added and the one from source code.

    IDE highlights changes in source code

Load source code for a data source

  1. In the Database tool window (View | Tool Windows | Database), click the Data Source Properties icon The Data Source Properties icon.

  2. Select one or more data sources for which you want to download source code.

  3. Right-click the selection and navigate to Load Sources. You can select between the following options:

    • None: do not download source code.

    • Except System Schemas: download source code for all the objects except for system schemas.

    • All Schemas: download all the available source code.

    Load source code for a data source

Controls of the Database Changes tool window

the Submit button Submit Ctrl+Enter Submit local changes to the database server. See Submit changes to a database.
the Rollback button Rollback Roll back changes.
Compare with Show Diff Ctrl+D Compare two versions of source code.
Group by Group by Ctrl+D Group objects according to their type. For example, routines, rules, or views.
the Expand All buttonCtrl+NumPad +Expand all nodes in all trees.
the Collapse All buttonCtrl+NumPad -Collapse all nodes in all trees.
Last modified: 19 August 2020