KandraRepository
class KandraRepository<T : Any>(session: CqlSession, schema: TableSchema, entityClass: KClass<T>, batchEngine: BatchEngine)
Blocking repository for performing CRUD operations on a ScyllaDB table.
Parameters
T
the entity type annotated with @ScyllaTable
Constructors
Link copied to clipboard
constructor(session: CqlSession, schema: TableSchema, entityClass: KClass<T>, batchEngine: BatchEngine)
Functions
Link copied to clipboard
fun <V> append(entity: T, field: KProperty1<T, Collection<V>?>, values: Collection<V>, consistency: KandraConsistency? = null)
Link copied to clipboard
fun decrement(field: KProperty1<T, Long?>, partitionKeys: Map<String, Any>, by: Long = 1, consistency: KandraConsistency? = null)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns all rows not yet soft-deleted. Requires @SoftDelete(markerProperty = "...") on T — throws KandraSchemaException otherwise.
Link copied to clipboard
Link copied to clipboard
fun findPage(pageSize: Int, pageToken: String? = null, block: QueryContext.() -> Unit = {}): KandraPage<T>
Link copied to clipboard
fun increment(field: KProperty1<T, Long?>, partitionKeys: Map<String, Any>, by: Long = 1, consistency: KandraConsistency? = null)
Link copied to clipboard
Link copied to clipboard
fun <V> remove(entity: T, field: KProperty1<T, Collection<V>?>, values: Collection<V>, consistency: KandraConsistency? = null)
Link copied to clipboard
fun saveIfNotExists(entity: T, serialConsistency: KandraConsistency = KandraConsistency.LOCAL_SERIAL): Boolean
Link copied to clipboard
Link copied to clipboard