AsyncQuery
lightdb.async.AsyncQuery
case class AsyncQuery[Doc <: Document[Doc], Model <: DocumentModel[Doc]](asyncCollection: AsyncCollection[Doc, Model], filter: Option[Filter[Doc]], sort: List[Sort], offset: Int, limit: Option[Int], countTotal: Boolean, scoreDocs: Boolean, minDocScore: Option[Double], facets: List[FacetQuery[Doc]])
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Self type
-
Members list
Value members
Concrete methods
def facet(f: Model => FacetField[Doc], path: List[String], childrenLimit: Option[Int], dimsLimit: Option[Int]): AsyncQuery[Doc, Model]
def facets(f: Model => List[FacetField[Doc]], childrenLimit: Option[Int], dimsLimit: Option[Int]): AsyncQuery[Doc, Model]
def grouped[F](f: Model => Field[Doc, F], direction: SortDirection)(implicit transaction: Transaction[Doc]): Stream[IO, (F, List[Doc])]
def process(establishLock: Boolean, deleteOnNone: Boolean, safeModify: Boolean, maxConcurrent: Int)(f: Doc => IO[Option[Doc]])(implicit transaction: Transaction[Doc]): IO[Int]
Processes through each result record from the query modifying the data in the database.
Processes through each result record from the query modifying the data in the database.
Value parameters
- deleteOnNone
-
whether to delete the record if the function returns None (defaults to true)
- establishLock
-
whether to establish an id lock to avoid concurrent modification (defaults to true)
- f
-
the processing function for records
- maxConcurrent
-
the number of concurrent threads to process with (defaults to 1 for single-threaded)
- safeModify
-
whether to use safe modification. This results in loading the same object twice, but should never risk concurrent modification occurring. (defaults to true)
Attributes
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
In this article