QueryContext
DSL receiver for building query predicates and limit.
Every predicate must resolve to a partition key, clustering key, or lookup-table column. Kandra does not support ALLOW FILTERING — queries that cannot be served from a partition key will throw at query time.
repository.findAll {
UserTable.email eq "alice@example.com" // via @LookupIndex
limit(10)
}Why there's no +: earlier versions required +UserTable.email.eq(...), with eq() returning a plain KandraPredicate that unaryPlus() then registered. Forgetting the + on one predicate out of several compiled cleanly (Kotlin only warns on an unused expression) and silently dropped that predicate from the query — a correctness footgun with no way to detect it from inside QueryContext, since the discarded object never reached it. Declaring eq/gt/etc. as member extensions here instead means the comparison itself is the registration — there is no intermediate value that can be built and then forgotten.