Skip to content

Database Query — Reference

Reference · Advanced · Server Connect

Return a collection of selected database records.

Return a collection of selected database records.

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

Return a collection of selected database records.

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.
SortThe requested sort field or alias. The default binding uses $_GET.sort. The runtime matches it against selected columns; choose an allowed field and use an explicit default order in the builder.
DirectionThe requested sort direction, normally asc or desc. The default binding uses $_GET.dir. Supply a controlled value rather than assuming arbitrary input is meaningful.
Query BuilderChoose the source table, output columns, aliases, conditions, joins and ordering for the generated query. The selected names become the response fields.

Build a query selecting id, name and price from a disposable products table. Name the step products and enable Output. Test zero, one and several matching rows; bind a page repeat to the returned products array rather than treating it as a single record.

A normal query returns an array. Selected fields and aliases determine the output shape. Conditions, joins and ordering are defined in the Query Builder; a client-side filter is not a substitute for server-side access or ownership conditions.

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.