CLion 2020.3 Help

Manage data sources

Data source is a location of data for your application. In CLion, you can define the following data sources:

  • Database data source: operational databases that contain data (see Database connection ).

  • Data Definition Language (DDL) files: SQL files that contain data definition language statements.

Configure display options for data sources

You can group, assign a color, and filter objects in the Database tool window (View | Tool Windows | Database ).

Customize the view of objects in the Database tool window

  • To group, enable, or sort data sources, click the Show Options menu icon the Show Options menu icon on the title bar of the Database tool window and select the necessary options.

    In the Database tool window (View | Tool Windows | Database ), the view of the data source changes instantly.

    the Show Options menu icon

Group data sources in folders

  • In the Database tool window (View | Tool Windows | Database ), select the necessary data source and press F6. Alternatively, right-click a data source and select Move to Folder.

    • If you do not have any folders, you will see the New Folder dialog. In the text field, type the folder name. You can use a forward slash (/) to define nesting. For example, the QA/Quick name will create the Quick folder inside the QA folder.

      Move to Folder
    • If you have folders with grouped data sources, you will see the Move to Folder dialog. To create a new folder, select New Folder. To remove a data source from the folder, select Root folder.

Assign a color to a data source

To have better differentiation between production and test databases, you can assign a color to 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 the data source for which you want to assign a color.

  3. Click the circle in the Name field to select a color.

    Assign a color to a data source

Assign a color to query consoles and grids

  • The text data viewer can use the color of the data source. To set a color, right-click a data source and select Color Settings. In the Database Color Settings dialog, select the dialog and coloring options. To have the data source color applied for query consoles and grids, select the In console editors and grids checkbox.

Filter objects from the toolbar

  • To select the necessary objects, use the Filter icon on the toolbar the Filter icon.

    The Filter menu

Show comments for data sources and database objects

  • To enable descriptions for databases and tables, navigate to View | Appearance and select Descriptions in Tree Views.

    To add comments for tables, select a table and press Ctrl+F6. In the Comment text field, add a table description.

    To add comments for a database, open database settings Ctrl+Alt+S and add a database description in the Comment text field.

    Show descriptions for databases and tables
Last modified: 08 March 2021