Skip to content

Database Single Query — Reference

Reference · Advanced · Server Connect

Return the first matching database record rather than a collection.

Return the first matching database record rather than a collection.

  • A working database connection and a disposable test table or records. Validate inputs and enforce access before private reads or writes.

Return the first matching database record rather than a collection.

Setting Meaning
NameThe step name used by later server expressions and named action output. For example, a query named products is available to subsequent steps as products.
OutputIncludes 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.
DebugChanges 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.
ConnectionThe database connection definition to use. It must be available and correctly configured for the active target.
Query TypeSelects ordinary, single-record or paged-query behavior. Changing it changes the result shape and the controls relevant to the query.
Query BuilderChoose the source table, output columns, aliases, conditions, joins and ordering for the generated query. The selected names become the response fields.

Select a product by a validated id and use a deterministic condition/order when several rows could match. Enable Output and inspect the object fields directly. Repeat with an absent id and implement a deliberate not-found response.

Single Query does not prove that the database contains only one match. Define a unique key or an appropriate condition. No-record output can be null or omitted according to the runtime/driver path, so test your deployed response instead of assuming an empty array.

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.

You can configure the intended query/write scope and verify its result shape or database effect.