QueryExecutor
class QueryExecutor(session: CqlSession, schema: TableSchema, statementBuilder: StatementBuilder, codec: KandraCodec = KandraCodec.default, debugConfig: DebugConfig = DebugConfig())
Translates QueryContext predicates into CQL SELECT statements and decodes results.
Lookup predicates trigger a two-step query:
Query the lookup table for the primary table's full key (partition + clustering columns).
Query the primary table by that full key.
@SecondaryIndex predicates query the primary table directly (no two-step needed). A WARN is logged each time a secondary index query executes.
IN on a single-column partition key is supported — a DEBUG message is logged since it causes scatter-gather across partitions (legitimate but worth tracking).
Constructors
Link copied to clipboard
constructor(session: CqlSession, schema: TableSchema, statementBuilder: StatementBuilder, codec: KandraCodec = KandraCodec.default, debugConfig: DebugConfig = DebugConfig())
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun <T : Any> findAllSuspend(entityClass: KClass<T>, block: QueryContext.() -> Unit): List<T>
Link copied to clipboard
suspend fun <T : Any> findByIdSuspend(entityClass: KClass<T>, vararg idValues: Any, consistency: KandraConsistency? = null): T?
Link copied to clipboard
suspend fun <T : Any> findPageSuspend(entityClass: KClass<T>, pageSize: Int, pageToken: String?, block: QueryContext.() -> Unit): KandraPage<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard