Statements
Statements define the top-level building blocks of any DQL query. Each statement serves as an entry point to express a specific intent, such as selecting data, combining datasets, or controlling query logic.
All DQL logic is built on nested expressions, but every query must start with exactly one statement. These are the outermost containers that structure how data should be processed or returned.
$selectNode
Added in: indicate.dsl.dql@1.0.0
Defines a top-level query or subquery node.
{
"$selectNode": Object ( SetOperation )
}
SetOperation
Set operations allow combining multiple queries or subqueries.
{
"$select": Object ( SelectStatement ),
"$union": Array ( Object ( SetOperation ) ),
"$unionAll": Array ( Object ( SetOperation ) ),
"$unionAllByName": Array ( Object ( SetOperation ) ),
"$intersect": Array ( Object ( SetOperation ) ),
"$intersectAll": Array ( Object ( SetOperation ) ),
"$except": Array ( Object ( SetOperation ) ),
"$exceptAll": Array ( Object ( SetOperation ) )
}
SelectStatement
Describes a standard projection-style query with filters, columns, grouping, and more.
{
"$columns": Array ( Expression ),
"$from": <string> | Object ( Expression ),
"$where": Object ( LogicalExpression ),
"$groupBy": Array ( Expression ),
"$having": Object ( LogicalExpression ),
"$orderBy": Array ( OrderBy ),
"$limit": <integer>,
"$offset": <integer>,
"$distinct": <boolean>,
"$derivedColumns": <boolean>
}
Note: Each clause is optional, except
$columns, which is required.
Most query logic lives in nested expressions, which are documented separately in the Expressions section.