Star Expression
$star
Added in: indicate.dsl.dql@1.0.0
Selects all columns—optionally scoped by table and filtered or transformed using patterns, exclusion, replacement, or renaming.
"$star": Object ( Star ),
Properties within $star
The following fields can be used inside a $star expression to define how fields are included, renamed, excluded, or matched by pattern:
| Field | Type | Description |
|---|---|---|
$table | <string> | References all fields from a given table or source |
$not | <boolean> | Reverses the pattern match result |
$like | <string> | Matches field names based on a pattern |
$iLike | <string> | Pattern match that ignores case |
$similar | <string> | Matches fields using a similarity pattern |
$glob | <string> | Uses glob-style wildcards to match field names |
$exclude | Array ( Expression ) | Removes fields from the selection |
$replace | Array ( Expression ) | Substitutes matching fields with new expressions |
$rename | Array ( Expression ) | Renames fields while keeping their values |
When using multiple modifiers (e.g. $like, $exclude, $rename), they are applied in this order:
- Column selection (
$table,$like,$iLike,$similar,$glob) - Negation (
$not) - Exclusion (
$exclude) - Replacement (
$replace) - Renaming (
$rename)
Each step builds on the previous one for consistent, predictable results.
$star:
This selects all available fields without any filtering or transformation.
- JSON
- SQL
{
"$star": {}
}
SELECT *;
$star with $rename:
This selects all fields and renames specific ones using $rename mappings.
- JSON
- SQL
{
"$star": {
"$rename": [
{
"$identifier": "col1",
"$as": "size"
},
{
"$identifier": "col2",
"$as": "color"
}
]
}
}
SELECT * RENAME (col1 AS size, col2 AS color);
$columns
Added in: indicate.dsl.dql@1.0.0
Declares a static list of expressions as column outputs in a projection.
{
"$columns": Array ( Expression )
}
- JSON
- SQL
{
"$columns": true,
"$star": {}
}
SELECT COLUMNS(*);
$unpacked
Added in: indicate.dsl.dql@1.0.0
Unpacks elements of a composite value (like a tuple or list) into multiple columns.
{
"$unpacked": Array ( Expression )
}
- JSON
- SQL
{
"$unpacked": true,
"$star": {}
}
SELECT *COLUMNS(*);