DB

interface DB : DBRead, DBWrite, Closeable

Types

Companion
Link copied to clipboard
common
object Companion
RegisterDsl
Link copied to clipboard
common
interface RegisterDsl<M : Any>

Functions

close
Link copied to clipboard
common
abstract fun close()
delete
Link copied to clipboard
common
open fun <M : Any> delete(type: KClass<M>, key: Key<M>)
open override fun <M : Any> delete(type: KClass<M>, key: Key<M>, vararg options: Options.Deletes)
abstract fun <M : Any> delete(type: KClass<M>, key: Key<M>, vararg options: Options.DirectDelete)
find
Link copied to clipboard
common
abstract fun <M : Any> find(type: KClass<M>, vararg options: Options.Find): DBRead.FindDsl<M>
findAll
Link copied to clipboard
common
abstract fun findAll(vararg options: Options.Find): Cursor<*>
flowOf
Link copied to clipboard
common
abstract fun <M : Any> flowOf(type: KClass<M>, key: Key<M>, init: Boolean = true): Flow<M?>
get
Link copied to clipboard
common
abstract operator fun <M : Any> get(type: KClass<M>, key: Key<M>, vararg options: Options.Get): M?
getIndexesOf
Link copied to clipboard
common
abstract fun getIndexesOf(key: Key<*>): Set<String>
keyById
Link copied to clipboard
common
abstract fun <M : Any> keyById(type: KClass<M>, vararg id: Any): Key<M>
keyFrom
Link copied to clipboard
common
abstract fun <M : Any> keyFrom(model: M, vararg options: Options.Puts): Key<M>
keyFromB64
Link copied to clipboard
common
abstract fun <M : Any> keyFromB64(type: KClass<M>, b64: String): Key<M>
newBatch
Link copied to clipboard
common
abstract fun newBatch(vararg options: Options.NewBatch): Batch
newSnapshot
Link copied to clipboard
common
abstract fun newSnapshot(vararg options: Options.NewSnapshot): Snapshot
on
Link copied to clipboard
common
abstract fun <M : Any> on(type: KClass<M>): DB.RegisterDsl<M>
onAll
Link copied to clipboard
common
abstract fun onAll(): DB.RegisterDsl<Any>
put
Link copied to clipboard
common
open fun <M : Any> put(model: M): Key<M>
abstract fun <M : Any> put(model: M, vararg options: Options.DirectPut): Key<M>
open override fun <M : Any> put(model: M, vararg options: Options.Puts): Key<M>
open fun <M : Any> put(key: Key<M>, model: M)
abstract fun <M : Any> put(key: Key<M>, model: M, vararg options: Options.DirectPut)
open override fun <M : Any> put(key: Key<M>, model: M, vararg options: Options.Puts)

Extensions

delete
Link copied to clipboard
common
inline fun <M : Any> DB.delete(key: Key<M>, vararg options: Options.DirectDelete)
deleteAll
Link copied to clipboard
common
inline fun <M : Any> DB.deleteAll(cursor: Cursor<M>, vararg options: Options.DirectDelete)
deleteById
Link copied to clipboard
common
inline fun <M : Any> DB.deleteById(vararg id: Any, options: Array<out Options.DirectDelete> = emptyArray())
execBatch
Link copied to clipboard
common
inline fun DB.execBatch(vararg options: Options.BatchWrite, block: ExecBatch.() -> Unit)
flowOf
Link copied to clipboard
common
inline fun <M : Any> DB.flowOf(key: Key<M>, init: Boolean = true): Flow<M?>
on
Link copied to clipboard
common
inline fun <M : Any> DB.on(): DB.RegisterDsl<M>
stateFlowFrom
Link copied to clipboard
common
inline suspend fun <M : Any> DB.stateFlowFrom(scope: CoroutineScope, model: M): StateFlow<M?>
stateFlowOf
Link copied to clipboard
common
suspend fun <M : Any> DB.stateFlowOf(scope: CoroutineScope, type: KClass<M>, key: Key<M>): StateFlow<M?>
inline suspend fun <M : Any> DB.stateFlowOf(scope: CoroutineScope, key: Key<M>): StateFlow<M?>
stateFlowOfId
Link copied to clipboard
common
inline suspend fun <M : Any> DB.stateFlowOfId(scope: CoroutineScope, vararg id: Any): StateFlow<M?>