Skip to content

Bring the select { } block up to parity with the chained builder #397

Description

@zantvoort

SqlScope (storm-kotlin/src/main/kotlin/st/orm/template/QueryBuilder.kt:1387-1612) lags the chained QueryBuilder on clause-shaping methods: missing are narrow, widen, typedId, forLock, whereId, whereRef, the aliased join(JoinType, ..., alias) variants, subquery joins, and every template-based join. The absence of narrow/widen is the most visible now that they define the root-model axis: the SqlScope constructor takes an already-widened QueryBuilder<Data, R, ID> (:1388), so a block user has no way back to the root model at all.

Type safety also degrades in block form: chained where takes PredicateBuilder<out T, *, *> (:567) while the block takes PredicateBuilder<*, *, *> (:1391), so nothing ties the predicate root to the query root, and SqlScope.fetch needs an unchecked cast (:1575-1576).

Terminals (page, scroll, build) are legitimately absent from the block; the clause vocabulary should not be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    corestorm-core and foundation workenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions