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.
SqlScope(storm-kotlin/src/main/kotlin/st/orm/template/QueryBuilder.kt:1387-1612) lags the chainedQueryBuilderon clause-shaping methods: missing arenarrow,widen,typedId,forLock,whereId,whereRef, the aliasedjoin(JoinType, ..., alias)variants, subquery joins, and every template-based join. The absence ofnarrow/widenis the most visible now that they define the root-model axis: theSqlScopeconstructor takes an already-widenedQueryBuilder<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
wheretakesPredicateBuilder<out T, *, *>(:567) while the block takesPredicateBuilder<*, *, *>(:1391), so nothing ties the predicate root to the query root, andSqlScope.fetchneeds an unchecked cast (:1575-1576).Terminals (
page,scroll,build) are legitimately absent from the block; the clause vocabulary should not be.