lightdb.collection.Collection
See theCollection companion object
case class Collection[Doc <: Document[Doc], Model <: DocumentModel[Doc]](name: String, model: Model, loadStore: () => Store[Doc, Model], maxInsertBatch: Int, cacheQueries: Boolean) extends Initializable
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Initializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
Members list
Type members
Classlikes
object t
Convenience feature for simple one-off operations removing the need to manually create a transaction around it.
Convenience feature for simple one-off operations removing the need to manually create a transaction around it.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
t.type
object transaction
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
transaction.type
object trigger extends CollectionTriggers[Doc]
Attributes
- Supertypes
- Self type
-
trigger.type
Value members
Concrete methods
def delete[V](f: Model => (UniqueIndex[Doc, V], V))(implicit transaction: Transaction[Doc]): Boolean
def delete(id: Id[Doc])(implicit transaction: Transaction[Doc], ev: Model <:< DocumentModel[_]): Boolean
def get[V](f: Model => (UniqueIndex[Doc, V], V))(implicit transaction: Transaction[Doc]): Option[Doc]
def getOrCreate(id: Id[Doc], create: => Doc, lock: Boolean)(implicit transaction: Transaction[Doc]): Doc
def modify(id: Id[Doc], lock: Boolean, deleteOnNone: Boolean)(f: Option[Doc] => Option[Doc])(implicit transaction: Transaction[Doc]): Option[Doc]
Inherited methods
Calls initialize() exactly one time. Safe to call multiple times.
Calls initialize() exactly one time. Safe to call multiple times.
Attributes
- Inherited from:
- Initializable
Attributes
- Inherited from:
- Initializable
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
In this article