ProjectedSql<R, F extends Fields, O extends ProjectionOutput> extension

SQL composition that preserves a flat projection's named output fields.

Ordinary Query composition remains available. The source scope changes only at the explicit CTE or UNION boundary, never merely at select.

on

Methods

asCte(String name) → DerivedQuery<R, O, Projection<R, O>>

Available on SelectedQuery<R, F, Projection<R, O>>, provided by the ProjectedSql extension

Exports named output slots into a fresh SQL scope.
union<G extends Fields>(SelectedQuery<R, G, Projection<R, O>> other) → SelectedQuery<R, O, Projection<R, O>>

Available on SelectedQuery<R, F, Projection<R, O>>, provided by the ProjectedSql extension

Combines rows from the same projection declaration, removing duplicates.
unionAll<G extends Fields>(SelectedQuery<R, G, Projection<R, O>> other) → SelectedQuery<R, O, Projection<R, O>>

Available on SelectedQuery<R, F, Projection<R, O>>, provided by the ProjectedSql extension

Combines matching SQL rows, preserving duplicates.