Database Custom Query — Reference
Execute a database-specific SQL query with explicitly bound parameters.
Execute a database-specific SQL query with explicitly bound parameters.
Before you begin
Section titled “Before you begin”- A working database connection and a disposable test table or records. Validate inputs and enforce access before private reads or writes.
Database Custom Query
Section titled “Database Custom Query”Execute a database-specific SQL query with explicitly bound parameters.
Settings
Section titled “Settings”| Setting | Meaning |
|---|---|
| Name | The step name used by later server expressions and named action output. For example, a query named products is available to subsequent steps as products. |
| Output | Includes the named result in the action response. The result can be used by later server steps when Output is off. Several rules initialize Output on although their declared default is false; inspect the saved action. |
| Debug | Changes diagnostic behavior where supported. For regular SQL Query/Single Query it returns query details instead of the normal records. It can expose SQL and bound data. The installed Node.js Custom Query path still executes the query when this flag is set; do not treat it as a general dry-run guarantee. |
| Connection | The database connection definition to use. It must be available and correctly configured for the active target. |
| Build Query | Opens the custom SQL editor and its parameter/schema configuration. Define the placeholders and their bound values, then verify the result columns. |
Worked example
Section titled “Worked example”Start with a read-only test query such as SELECT id, name FROM products WHERE id = :id. Define the matching parameter and bind a validated numeric value. Check both the returned fields and the no-result case before using the output in a page.
Result and safety boundaries
Section titled “Result and safety boundaries”Bind values as parameters instead of concatenating input into SQL. Parameter bindings do not turn untrusted table names or SQL fragments into safe identifiers. SQL syntax and result shape depend on the database. The installed Node.js custom-query method does not honor Debug as a non-executing preview; never rely on that switch to make a write query harmless.
Use the database workflow
Section titled “Use the database workflow”Use Database Manager to define and inspect the underlying tables. Use Server Connect to control the data returned to the page, and verify the actual response shape before choosing an App Connect binding.
Check your result
Section titled “Check your result”You can configure the intended query/write scope and verify its result shape or database effect.