class MongoSource[Doc] extends MongoSourceImpl
- Source
- MongoSource.scala
- Alphabetic
- By Inheritance
- MongoSource
- MongoSourceImpl
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MongoSource(collection: MongoCollection[Doc])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def aggregate(pipeline: Seq[Bson]): Observable[Document]
Aggregates documents according to the specified aggregation pipeline.
Aggregates documents according to the specified aggregation pipeline.
- pipeline
the aggregate pipeline.
- returns
an Observable of type Document, containing the result of the aggregation pipeline
- def aggregate[T](pipeline: Seq[Bson], clazz: Class[T]): Observable[T]
Aggregates documents according to the specified aggregation pipeline.
Aggregates documents according to the specified aggregation pipeline.
- T
the returned type result of the aggregation
- pipeline
the aggregate pipeline
- clazz
the class to decode each document into
- returns
an Observable of type B, containing the result of the aggregation pipeline
- def aggregate[Doc](collection: MongoCollection[Doc], pipeline: Seq[Bson]): Observable[Document]
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def aggregate[A, B](collection: MongoCollection[A], pipeline: Seq[Bson], clazz: Class[B]): Observable[B]
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def count(filter: Bson, countOptions: CountOptions = DefaultCountOptions, retryStrategy: RetryStrategy = DefaultRetryStrategy): Task[Long]
Counts the number of documents in the collection that matched the query filter.
Counts the number of documents in the collection that matched the query filter.
- filter
a document describing the query filter
- countOptions
the options to apply to the count operation
- retryStrategy
defines the amount of retries and backoff delays for failed requests.
- returns
a Task with a long indicating the number of documents, the result can be -1 if the underlying publisher did not emitted any documents, or a failed one when emitted an error.
- See also
com.mongodb.client.model.Filters
- def count(filter: Bson): Task[Long]
Counts the number of documents in the collection that matched the query filter.
Counts the number of documents in the collection that matched the query filter.
- filter
a document describing the query filter
- returns
a Task with a long indicating the number of documents the result will be -1 if the underlying publisher did not emitted any documents, or a failed one when emitted an error.
- See also
com.mongodb.client.model.Filters
- def count[Doc](collection: MongoCollection[Doc], filter: Bson, countOptions: CountOptions, retryStrategy: RetryStrategy): Task[Long]
Counts the number of documents in the collection that matched the query filter.
Counts the number of documents in the collection that matched the query filter.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def count[Doc](collection: MongoCollection[Doc], filter: Bson): Task[Long]
Counts the number of documents in the collection that matched the query filter.
Counts the number of documents in the collection that matched the query filter.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def countAll(retryStrategy: RetryStrategy = DefaultRetryStrategy): Task[Long]
Counts all the documents in the collection.
Counts all the documents in the collection.
- retryStrategy
defines the amount of retries and backoff delays for failed requests.
- returns
a Task with a long indicating the number of documents the result will be -1 if the underlying publisher did not emitted any documents, or a failed one when emitted an error.
- def countAll: Task[Long]
Counts all the documents in the collection.
Counts all the documents in the collection.
- returns
a Task with a long indicating the number of documents the result will be -1 if the underlying publisher did not emitted any documents, or a failed one when emitted an error.
- def countAll[Doc](collection: MongoCollection[Doc], retryStrategy: RetryStrategy): Task[Long]
Counts all the documents in the collection.
Counts all the documents in the collection.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def countAll[Doc](collection: MongoCollection[Doc]): Task[Long]
Counts all the documents in the collection.
Counts all the documents in the collection.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def distinct(fieldName: String, filter: Bson)(implicit m: Manifest[Doc]): Observable[Doc]
Gets the distinct values of the specified field name.
Gets the distinct values of the specified field name.
- fieldName
the document's field name
- filter
a document describing the query filter
- m
implicit manifest of type Doc
- returns
an Observable that emits the distinct the distinct values of type Doc
- See also
com.mongodb.client.model.Filters
- def distinct[T](fieldName: String, clazz: Class[T]): Observable[T]
Gets the distinct values of the specified field name.
Gets the distinct values of the specified field name.
- T
the type of the field which the distinct operation is pointing to
- fieldName
the document's field name
- clazz
the class to decode each document into
- returns
an Observable that emits the distinct the distinct values of type Doc
- def distinct[Doc](collection: MongoCollection[Doc], fieldName: String, filter: Bson)(implicit m: Manifest[Doc]): Observable[Doc]
Gets the distinct values of the specified field name.
Gets the distinct values of the specified field name.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def distinct[Doc, T](collection: MongoCollection[Doc], fieldName: String, clazz: Class[T]): Observable[T]
Gets the distinct values of the specified field name.
Gets the distinct values of the specified field name.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def find(filter: Bson): Observable[Doc]
Finds the documents in the collection that matched the query filter.
Finds the documents in the collection that matched the query filter.
- filter
a document describing the query filter.
- returns
the documents that matched with the given filter
- See also
com.mongodb.client.model.Filters
- def find[Doc](collection: MongoCollection[Doc], filter: Bson): Observable[Doc]
Finds the documents in the collection that matched the query filter.
Finds the documents in the collection that matched the query filter.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def findAll: Observable[Doc]
Finds all documents in the collection.
Finds all documents in the collection.
- returns
all documents of type Doc within the collection
- def findAll[Doc](collection: MongoCollection[Doc]): Observable[Doc]
Finds all documents in the collection.
Finds all documents in the collection.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def findOne(filter: Bson): Task[Option[Doc]]
Finds the first encountered document in the collection that matched the query filter if exists, or the empty option if does not.
Finds the first encountered document in the collection that matched the query filter if exists, or the empty option if does not.
- filter
a document describing the query filter.
- returns
the optional document that matched with the given filter
- See also
com.mongodb.client.model.Filters
- def findOne[Doc](collection: MongoCollection[Doc], filter: Bson): Task[Option[Doc]]
Finds the first encountered document in the collection that matched the query filter if exists, or the empty option if does not.
Finds the first encountered document in the collection that matched the query filter if exists, or the empty option if does not.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def findOneAndDelete(filter: Bson, findOneAndDeleteOptions: FindOneAndDeleteOptions = DefaultFindOneAndDeleteOptions, retryStrategy: RetryStrategy = DefaultRetryStrategy): Task[Option[Doc]]
Atomically find a document and remove it.
Atomically find a document and remove it.
- filter
the query filter to find the document with
- findOneAndDeleteOptions
the options to apply to the operation
- retryStrategy
defines the amount of retries and backoff delays for failed requests.
- returns
a Task containing an optional of the document type that was removed if no documents matched the query filter it returns an empty option.
- See also
com.mongodb.client.model.Filters
- def findOneAndDelete(filter: Bson): Task[Option[Doc]]
Atomically find a document and remove it.
Atomically find a document and remove it.
- filter
the query filter to find the document with
- returns
a Task containing an optional of the document type that was removed if no documents matched the query filter it returns an empty option.
- See also
com.mongodb.client.model.Filters
- def findOneAndDelete[Doc](collection: MongoCollection[Doc], filter: Bson, findOneAndDeleteOptions: FindOneAndDeleteOptions, retryStrategy: RetryStrategy): Task[Option[Doc]]
Atomically find a document and remove it.
Atomically find a document and remove it.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def findOneAndDelete[Doc](collection: MongoCollection[Doc], filter: Bson): Task[Option[Doc]]
Atomically find a document and remove it.
Atomically find a document and remove it.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def findOneAndReplace(filter: Bson, replacement: Doc, findOneAndReplaceOptions: FindOneAndReplaceOptions = DefaultFindOneAndReplaceOptions, retryStrategy: RetryStrategy = DefaultRetryStrategy): Task[Option[Doc]]
Atomically find a document and replace it.
Atomically find a document and replace it.
- filter
the query filter to find the document with
- replacement
the replacement document
- findOneAndReplaceOptions
the options to apply to the operation
- retryStrategy
defines the amount of retries and backoff delays for failed requests.
- returns
a Task with an optional of the document document that was replaced. If no documents matched the query filter, then an empty option will be returned.
- See also
com.mongodb.client.model.Filters
- def findOneAndReplace(filter: Bson, replacement: Doc): Task[Option[Doc]]
Atomically find a document and replace it.
Atomically find a document and replace it.
- filter
the query filter to find the document with
- replacement
the replacement document
- returns
a Task with an optional of the document that was replaced. If no documents matched the query filter, then an empty option will be returned.
- See also
com.mongodb.client.model.Filters
- def findOneAndReplace[Doc](collection: MongoCollection[Doc], filter: Bson, replacement: Doc, findOneAndReplaceOptions: FindOneAndReplaceOptions, retryStrategy: RetryStrategy): Task[Option[Doc]]
Atomically find a document and replace it.
Atomically find a document and replace it.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def findOneAndReplace[Doc](collection: MongoCollection[Doc], filter: Bson, replacement: Doc): Task[Option[Doc]]
Atomically find a document and replace it.
Atomically find a document and replace it.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def findOneAndUpdate(filter: Bson, update: Bson, findOneAndUpdateOptions: FindOneAndUpdateOptions = DefaultFindOneAndUpdateOptions, retryStrategy: RetryStrategy = DefaultRetryStrategy): Task[Option[Doc]]
Atomically find a document and update it.
Atomically find a document and update it.
- filter
the query filter to find the document with
- update
a document describing the update, which may not be null. The update to apply must include only update operators
- findOneAndUpdateOptions
the options to apply to the operation
- retryStrategy
defines the amount of retries and backoff delays for failed requests.
- returns
a Task with an optional of the document that was updated before the update was applied, if no documents matched the query filter, then an empty option will be returned.
- See also
com.mongodb.client.model.Filters
- def findOneAndUpdate(filter: Bson, update: Bson): Task[Option[Doc]]
Atomically find a document and update it.
Atomically find a document and update it.
- filter
the query filter to find the document with
- update
a document describing the update, which may not be null. The update to apply must include only update operators
- returns
a Task with an optional of the document that was updated before the update was applied, if no documents matched the query filter, then an empty option will be returned.
- See also
com.mongodb.client.model.Filters
- def findOneAndUpdate[Doc](collection: MongoCollection[Doc], filter: Bson, update: Bson, findOneAndUpdateOptions: FindOneAndUpdateOptions, retryStrategy: RetryStrategy): Task[Option[Doc]]
Atomically find a document and update it.
Atomically find a document and update it.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- def findOneAndUpdate[Doc](collection: MongoCollection[Doc], filter: Bson, update: Bson): Task[Option[Doc]]
Atomically find a document and update it.
Atomically find a document and update it.
- Attributes
- protected[this]
- Definition Classes
- MongoSourceImpl
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()