ToolJet/docs/versioned_docs/version-2.36.0/tutorial/building-queries.md
Karan Rathod 11d38325cb
[docs]:App builder 1.6 updates (#9514)
* add app-builder doc updates on Table and themes

* breakdown chart docs in two parts and add custom css for headers

* update chart example images and add more examples

* revamp table component and minor fixes

* fix typos

* fix table formatting for docusarus v3

* fix filepicker table

* create new version

* fix grammar and tables
2024-04-26 15:17:51 +05:30

1.7 KiB

id title
building-queries Building Queries

Building Queries

Query Editor lives at the bottom of the page. We will now build a query for the PostgreSQL datasource that we connected in the previous step.

:::tip You can click on the 'enlarge' icon to enlarge query editor pane. :::

  • Click on the + icon of the query editor to create a new query.
  • Select the PostgreSQL datasource created in previous step.
  • Copy the query given below and paste on the query area.
  • Select SQL mode
SELECT * FROM customers;
query

Query results can be previewed by clicking the preview button. Previewing queries will not alter the state of the app.

preview

Advanced options

advanced options

Run query on page load

If this option is enabled, the query will be run when the app is loaded for the first time. The queries can have more than one trigger, ie the same query can later be triggered again using a button's click event or table's row selected event or any other events.

Request confirmation before running query

Enable this option to show a prompt to confirm the action before a query is run. The confirmation prompt will look like this:

confirm

Show notification on success

Enable this option to show a custom message on query completion. Duration of the notification can also be set.