PostgreSQL - Query
PostgreSQL - Query
Runs a SQL statement on a PostgreSQL database. It supports SELECT, INSERT, UPDATE, DELETE and other standard SQL statements. The results can be iterated with PostgreSQL: For each result or read directly from the action returns.
Options
Connection
Reference to the PostgreSQL: Connection action that will be used to run the query.
Query to be executed
SQL statement to run, for example SELECT * FROM public.usuarios WHERE ativo = true.
Timeout
Maximum time, in seconds, the action waits for the database response before failing. Optional field.
Returns
Javascript code
js
actions["action-id"].query // query that was executed (Text)
actions["action-id"].results // query results (Any)
actions["action-id"].resultsCount // number of results (Number)
Field selection
- query — query that was executed (Text)
- results — list of the query results (Any)
- resultsCount — total count of the results (Number)
Rules and Conditions
- The Connection and Query fields are required.
resultsandresultsCountare relevant for SELECT statements.