Skip to content

Toro Cloud Dev Center

SQL query editor

The SQL query editor is Martini's dedicated editor for SQL statements. This editor becomes visible when you open a SQL file (.sql).

SQL query editor

This editor is comprised of the following user interface elements:

  1. Connection dropdown, which allows you to select which database will receive the query.
  2. Statement text area, where you the provide SQL statement(s) you want to execute; features content-assist and syntax highlighting for ease of use.

    Format your SQL query

    You can format your query by right clicking on the statement text area and selecting Format, or by using the shortcut .

    Formatting SQL query

  3. Run button, which allows you to execute the written SQL command.

  4. Refresh button, which allows you to fetch the latest list of available connection pools.
  5. Results panel, where the results of your query will be displayed.

Export as Gloop SQL service

You can create a Gloop SQL service from a SQL file by right clicking the latter from the Navigator and then choosing Export > Gloop SQL Service from the appearing context menu.

Export SQL file as Gloop service

Creating a new SQL query

To create a new SQL query, right-click on the queries directory of the server which contains the connection you would like to query against, and choose New > SQL Query. If you're in the Database perspective, the queries directory will appear under the server itself in the Database Navigator; otherwise it will appear in the core package of the server in the Navigator.

Creating a new SQL query


The SQL query editor lets you write SQL statements faster through content-assist. With content-assist, possible query fragments will be suggested as you write.

To trigger content-assist, press . A pop-up will appear right under the line where you pressed the shortcut. This pop-up is composed of a search text field and a list of proposals.

Proposals are possible content that can be injected based on the current context; they have a name and a category. Proposals can be searched by their complete names or short names. You can use the and arrow keys to navigate through the proposals whilst still having focus on the search text so you can search and select at the same time.

Query results

The Results panel lets you view SQL statement results. Results are paginated for your convenience; just use the next and previous button to navigate through the entries. To view the complete content of a cell, click the button beside the cell. A dialog will appear, displaying the requested content.

Viewing query result details

Editor hotkeys

Pressing while the editor has focus will execute the query in the editor.

Exporting a schema table to a Gloop model

You can also export existing schema tables into Gloop models from the SQL query editor. In order to do that, follow the steps below:

  1. Open a SQL query of your choice.
  2. Under the Database tree, expand the Schemas node.
  3. Expand a schema of your choice.
  4. Expand Tables. This will show you a list of schema tables.
  5. Right click the schema table of your choice and select Export to Gloop Model.
  6. In the dialog that appears, specify the location and name of your model. The Location and Name fields are pre-populated by default, and set to the code directory and the name of the schema table respectively.
  7. Click Finish.

Exporting a SQL table to Gloop model

Alternatively, you can also export a Gloop model by right-clicking on a table in the Database Navigator of the Database perspective.