ModelDB

interface ModelDB : ModelWrite, ModelRead, ModelTypeMatcher, Closeable

Types

Companion
Link copied to clipboard
common
object Companion

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)
findAll
Link copied to clipboard
common
abstract fun findAll(vararg options: Options.Find): ModelCursor<*>
findAllByIndex
Link copied to clipboard
common
abstract fun <M : Any> findAllByIndex(type: KClass<M>, index: String, vararg options: Options.Find): ModelIndexCursor<M>
findAllByType
Link copied to clipboard
common
abstract fun <M : Any> findAllByType(type: KClass<M>, vararg options: Options.Find): ModelCursor<M>
findById
Link copied to clipboard
common
abstract fun <M : Any> findById(type: KClass<M>, id: Any, isOpen: Boolean = false, vararg options: Options.Find): ModelCursor<M>
findByIndex
Link copied to clipboard
common
abstract fun <M : Any> findByIndex(type: KClass<M>, index: String, value: Any, isOpen: Boolean = false, vararg options: Options.Find): ModelIndexCursor<M>
get
Link copied to clipboard
common
abstract fun <M : Any> get(type: KClass<M>, key: Key<M>, vararg options: Options.Get): Sized<M>?
getExtension
Link copied to clipboard
common
abstract fun <T : Any> getExtension(key: ExtensionKey<T>): T?
getIndexesOf
Link copied to clipboard
common
abstract fun getIndexesOf(key: Key<*>): Set<String>
getTypeId
Link copied to clipboard
common
abstract fun getTypeId(typeName: ReadMemory, createIfNone: Boolean = true): Int
getTypeName
Link copied to clipboard
common
abstract fun getTypeName(typeId: Int): ReadMemory?
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): ModelBatch
newSnapshot
Link copied to clipboard
common
abstract fun newSnapshot(vararg options: Options.NewSnapshot): ModelSnapshot
put
Link copied to clipboard
common
open fun <M : Any> put(model: M): KeyAndSize<M>
abstract fun <M : Any> put(model: M, vararg options: Options.DirectPut): KeyAndSize<M>
open override fun <M : Any> put(model: M, vararg options: Options.Puts): KeyAndSize<M>
open fun <M : Any> put(key: Key<M>, model: M): Int
abstract fun <M : Any> put(key: Key<M>, model: M, vararg options: Options.DirectPut): Int
open override fun <M : Any> put(key: Key<M>, model: M, vararg options: Options.Puts): Int
register
Link copied to clipboard
common
abstract fun register(listener: ModelDBListener<Any>): Closeable
valueOf
Link copied to clipboard
common
abstract fun valueOf(value: Any): Value
valueOfAll
Link copied to clipboard
common
abstract fun valueOfAll(vararg values: Any): Value

Properties

data
Link copied to clipboard
common
abstract val data: DataDB
typeTable
Link copied to clipboard
common
abstract val typeTable: TypeTable

Extensions

delete
Link copied to clipboard
common
inline fun <M : Any> ModelDB.delete(key: Key<M>, vararg options: Options.DirectDelete)
putAll
Link copied to clipboard
common
fun ModelDB.putAll(models: Iterable<Any>, vararg options: Options.DirectPut)