Packages

object MongoSource extends MongoSourceImpl

An object that exposes those MongoDb definitions for fetching data from collections by performing different type of read queries available such like find, count, distinct or aggregation. There are three exceptions in which the method also alters the data apart of reading it, which are the findOne and delete, replace or update.

Source
MongoSource.scala
Linear Supertypes
MongoSourceImpl, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MongoSource
  2. MongoSourceImpl
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def aggregate[Doc](collection: MongoCollection[Doc], pipeline: Seq[Bson]): Observable[Document]

    Aggregates documents according to the specified aggregation pipeline.

    Aggregates documents according to the specified aggregation pipeline.

    Doc

    the type that this collection will decode documents from.

    collection

    the abstraction to work with a determined MongoDB Collection.

    pipeline

    the aggregate pipeline.

    returns

    an Observable of type Document, containing the result of the aggregation pipeline

    Definition Classes
    MongoSource → MongoSourceImpl
  5. def aggregate[A, B](collection: MongoCollection[A], pipeline: Seq[Bson], clazz: Class[B]): Observable[B]

    Aggregates documents according to the specified aggregation pipeline.

    Aggregates documents according to the specified aggregation pipeline.

    A

    the type that this collection will decode documents from

    B

    the returned type result of the aggregation

    collection

    the abstraction to work with a determined MongoDB Collection

    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

    Definition Classes
    MongoSource → MongoSourceImpl
  6. def apply[Doc](collection: MongoCollection[Doc]): MongoSource[Doc]
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def count[Doc](collection: MongoCollection[Doc], 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb collection

    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.

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  10. 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb collection

    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.

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  11. def countAll[Doc](collection: MongoCollection[Doc], retryStrategy: RetryStrategy = DefaultRetryStrategy): Task[Long]

    Counts all the documents in the collection.

    Counts all the documents in the collection.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb 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.

    Definition Classes
    MongoSource → MongoSourceImpl
  12. def countAll[Doc](collection: MongoCollection[Doc]): Task[Long]

    Counts all the documents in the collection.

    Counts all the documents in the collection.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb 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.

    Definition Classes
    MongoSource → MongoSourceImpl
  13. 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb collection

    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

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  14. 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.

    Doc

    the type of the collection

    T

    the type of the field which the distinct operation is pointing to

    collection

    the abstraction to work with a determined mongodb collection

    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

    Definition Classes
    MongoSource → MongoSourceImpl
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  18. 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with a determined mongodb collection

    filter

    a document describing the query filter.

    returns

    the documents that matched with the given filter

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  19. def findAll[Doc](collection: MongoCollection[Doc]): Observable[Doc]

    Finds all documents in the collection.

    Finds all documents in the collection.

    Doc

    the type of the collection

    collection

    the abstraction to work with a determined mongodb collection

    returns

    all documents of type Doc within the collection

    Definition Classes
    MongoSource → MongoSourceImpl
  20. 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with a determined mongodb collection

    filter

    a document describing the query filter.

    returns

    the optional document that matched with the given filter

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  21. def findOneAndDelete[Doc](collection: MongoCollection[Doc], 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb collection

    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.

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  22. 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb collection

    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.

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  23. def findOneAndReplace[Doc](collection: MongoCollection[Doc], 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb collection

    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.

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  24. 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb collection

    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.

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  25. def findOneAndUpdate[Doc](collection: MongoCollection[Doc], 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb collection

    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.

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  26. 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.

    Doc

    the type of the collection

    collection

    the abstraction to work with the determined mongodb collection

    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.

    Definition Classes
    MongoSource → MongoSourceImpl
    See also

    com.mongodb.client.model.Filters

  27. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from MongoSourceImpl

Inherited from AnyRef

Inherited from Any

Ungrouped