Links
Comment on page

SQL Results Viewer

Summary

The SQL results pane allows your users to see the results of an SQL query.
SQL Results Viewer

Features

The SQL Results Viewer has numerous features:
  • View query results in a table
  • View history of previously run queries
  • Rerun previous queries with a single click
  • Edit a previously run query
  • Select a database

Getting Started

The only way to interact with the SQL Results Viewer tab is by using the Code Editor to write queries. Since this is the case it will be best to select a Two Pane (Horizontal) in the Interface Layout section in the Interface tab.
To configure the SQL results viewer, click on the Interface button in the left sidebar, then scroll down the the "SQL Results Display Settings" section. The settings are explained below.

General Settings

Database

The database to run queries against. Used by the {{database}} template.

Database Type

The type of database that should be used. This can be toggled between MySQL, PostgreSQL, and SQLite.

Database Selection Enabled

Whether or not the user is allowed to change the database that the SQL Results Viewer runs queries against. If enabled, the database dropdown (see below) is enabled.

Tab-Specific Settings

Database Dropdown

The database dropdown is in the bottom left corner of the SQL Results Viewer. When pressed, a list of all the databases in the project is shown and the user can select a database to run queries against.
Finally, make sure to use the Save button in the top left corner of your screen.
Last modified 2yr ago