Packages

c

org.mongodb.scala

MongoCollection

case classMongoCollection[TResult](wrapped: com.mongodb.async.client.MongoCollection[TResult]) extends Product with Serializable

The MongoCollection representation.

TResult

The type that this collection will encode documents from and decode documents to.

wrapped

the underlying java MongoCollection

Since

1.0

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MongoCollection
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. newMongoCollection(wrapped: com.mongodb.async.client.MongoCollection[TResult])

    wrapped

    the underlying java MongoCollection

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. defaggregate[C](clientSession: ClientSession, pipeline: Seq[Bson])(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): AggregateObservable[C]

    Aggregates documents according to the specified aggregation pipeline.

    Aggregates documents according to the specified aggregation pipeline.

    clientSession

    the client session with which to associate this operation

    pipeline

    the aggregate pipeline

    returns

    a Observable containing the result of the aggregation operation Aggregation

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  5. defaggregate[C](pipeline: Seq[Bson])(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): AggregateObservable[C]

    Aggregates documents according to the specified aggregation pipeline.

    Aggregates documents according to the specified aggregation pipeline.

    pipeline

    the aggregate pipeline

    returns

    a Observable containing the result of the aggregation operation Aggregation

  6. final defasInstanceOf[T0]: T0
    Definition Classes
    Any
  7. defbulkWrite(clientSession: ClientSession, requests: Seq[_ <: WriteModel[_ <: TResult]], options: BulkWriteOptions): SingleObservable[BulkWriteResult]

    Executes a mix of inserts, updates, replaces, and deletes.

    Executes a mix of inserts, updates, replaces, and deletes.

    clientSession

    the client session with which to associate this operation

    requests

    the writes to execute

    options

    the options to apply to the bulk write operation

    returns

    a Observable with a single element the BulkWriteResult

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  8. defbulkWrite(clientSession: ClientSession, requests: Seq[_ <: WriteModel[_ <: TResult]]): SingleObservable[BulkWriteResult]

    Executes a mix of inserts, updates, replaces, and deletes.

    Executes a mix of inserts, updates, replaces, and deletes.

    clientSession

    the client session with which to associate this operation

    requests

    the writes to execute

    returns

    a Observable with a single element the BulkWriteResult

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  9. defbulkWrite(requests: Seq[_ <: WriteModel[_ <: TResult]], options: BulkWriteOptions): SingleObservable[BulkWriteResult]

    Executes a mix of inserts, updates, replaces, and deletes.

    Executes a mix of inserts, updates, replaces, and deletes.

    requests

    the writes to execute

    options

    the options to apply to the bulk write operation

    returns

    a Observable with a single element the BulkWriteResult

  10. defbulkWrite(requests: Seq[_ <: WriteModel[_ <: TResult]]): SingleObservable[BulkWriteResult]

    Executes a mix of inserts, updates, replaces, and deletes.

    Executes a mix of inserts, updates, replaces, and deletes.

    requests

    the writes to execute

    returns

    a Observable with a single element the BulkWriteResult

  11. defclone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException])@native()
  12. lazy valcodecRegistry: CodecRegistry

    Get the codec registry for the MongoDatabase.

    Get the codec registry for the MongoDatabase.

    returns

    the { @link org.bson.codecs.configuration.CodecRegistry}

  13. defcountDocuments(clientSession: ClientSession, filter: Bson, options: CountOptions): SingleObservable[Long]

    Counts the number of documents in the collection according to the given options.

    Counts the number of documents in the collection according to the given options.

    Note: For a fast count of the total documents in a collection see estimatedDocumentCount() When migrating from count() to countDocuments() the following query operators must be replaced:

    +-------------+--------------------------------+ | Operator | Replacement | +=============+================================+ | $where | $expr | +-------------+--------------------------------+ | $near | $geoWithin with $center | +-------------+--------------------------------+ | $nearSphere | $geoWithin with $centerSphere | +-------------+--------------------------------+
    clientSession

    the client session with which to associate this operation

    filter

    the query filter

    options

    the options describing the count

    returns

    a publisher with a single element indicating the number of documents

    Since

    2.4

    Note

    Requires MongoDB 3.6 or greater

  14. defcountDocuments(clientSession: ClientSession, filter: Bson): SingleObservable[Long]

    Counts the number of documents in the collection according to the given options.

    Counts the number of documents in the collection according to the given options.

    Note: For a fast count of the total documents in a collection see estimatedDocumentCount() When migrating from count() to countDocuments() the following query operators must be replaced:

    +-------------+--------------------------------+ | Operator | Replacement | +=============+================================+ | $where | $expr | +-------------+--------------------------------+ | $near | $geoWithin with $center | +-------------+--------------------------------+ | $nearSphere | $geoWithin with $centerSphere | +-------------+--------------------------------+
    clientSession

    the client session with which to associate this operation

    filter

    the query filter

    returns

    a publisher with a single element indicating the number of documents

    Since

    2.4

    Note

    Requires MongoDB 3.6 or greater

  15. defcountDocuments(clientSession: ClientSession): SingleObservable[Long]

    Counts the number of documents in the collection.

    Counts the number of documents in the collection.

    Note: For a fast count of the total documents in a collection see estimatedDocumentCount() When migrating from count() to countDocuments() the following query operators must be replaced:

    +-------------+--------------------------------+ | Operator | Replacement | +=============+================================+ | $where | $expr | +-------------+--------------------------------+ | $near | $geoWithin with $center | +-------------+--------------------------------+ | $nearSphere | $geoWithin with $centerSphere | +-------------+--------------------------------+
    clientSession

    the client session with which to associate this operation

    returns

    a publisher with a single element indicating the number of documents

    Since

    2.4

    Note

    Requires MongoDB 3.6 or greater

  16. defcountDocuments(filter: Bson, options: CountOptions): SingleObservable[Long]

    Counts the number of documents in the collection according to the given options.

    Counts the number of documents in the collection according to the given options.

    Note: For a fast count of the total documents in a collection see estimatedDocumentCount() When migrating from count() to countDocuments() the following query operators must be replaced:

    +-------------+--------------------------------+ | Operator | Replacement | +=============+================================+ | $where | $expr | +-------------+--------------------------------+ | $near | $geoWithin with $center | +-------------+--------------------------------+ | $nearSphere | $geoWithin with $centerSphere | +-------------+--------------------------------+
    filter

    the query filter

    options

    the options describing the count

    returns

    a publisher with a single element indicating the number of documents

    Since

    2.4

  17. defcountDocuments(filter: Bson): SingleObservable[Long]

    Counts the number of documents in the collection according to the given options.

    Counts the number of documents in the collection according to the given options.

    Note: For a fast count of the total documents in a collection see estimatedDocumentCount() When migrating from count() to countDocuments() the following query operators must be replaced:

    +-------------+--------------------------------+ | Operator | Replacement | +=============+================================+ | $where | $expr | +-------------+--------------------------------+ | $near | $geoWithin with $center | +-------------+--------------------------------+ | $nearSphere | $geoWithin with $centerSphere | +-------------+--------------------------------+
    filter

    the query filter

    returns

    a publisher with a single element indicating the number of documents

    Since

    2.4

  18. defcountDocuments(): SingleObservable[Long]

    Counts the number of documents in the collection.

    Counts the number of documents in the collection.

    Note: For a fast count of the total documents in a collection see estimatedDocumentCount() When migrating from count() to countDocuments() the following query operators must be replaced:

    +-------------+--------------------------------+ | Operator | Replacement | +=============+================================+ | $where | $expr | +-------------+--------------------------------+ | $near | $geoWithin with $center | +-------------+--------------------------------+ | $nearSphere | $geoWithin with $centerSphere | +-------------+--------------------------------+
    returns

    a publisher with a single element indicating the number of documents

    Since

    2.4

  19. defcreateIndex(clientSession: ClientSession, key: Bson, options: IndexOptions): SingleObservable[String]

    Create Index

    clientSession

    the client session with which to associate this operation

    key

    an object describing the index key(s), which may not be null. This can be of any type for which a Codec is registered

    options

    the options for the index

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  20. defcreateIndex(clientSession: ClientSession, key: Bson): SingleObservable[String]

    Create Index

    clientSession

    the client session with which to associate this operation

    key

    an object describing the index key(s), which may not be null. This can be of any type for which a Codec is registered

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  21. defcreateIndex(key: Bson, options: IndexOptions): SingleObservable[String]

    Create Index

    key

    an object describing the index key(s), which may not be null. This can be of any type for which a Codec is registered

    options

    the options for the index

    returns

    a Observable with a single element indicating when the operation has completed

  22. defcreateIndex(key: Bson): SingleObservable[String]

    Create Index

    key

    an object describing the index key(s), which may not be null. This can be of any type for which a Codec is registered

    returns

    a Observable with a single element indicating when the operation has completed

  23. defcreateIndexes(clientSession: ClientSession, models: Seq[IndexModel], createIndexOptions: CreateIndexOptions): Observable[String]

    Create multiple indexes.

    Create multiple indexes.

    Create Index

    clientSession

    the client session with which to associate this operation

    models

    the list of indexes to create

    createIndexOptions

    options to use when creating indexes

    returns

    a Observable with the names of the indexes

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  24. defcreateIndexes(clientSession: ClientSession, models: Seq[IndexModel]): Observable[String]

    Create multiple indexes.

    Create multiple indexes.

    Create Index

    clientSession

    the client session with which to associate this operation

    models

    the list of indexes to create

    returns

    a Observable with the names of the indexes

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  25. defcreateIndexes(models: Seq[IndexModel], createIndexOptions: CreateIndexOptions): Observable[String]

    Create multiple indexes.

    Create multiple indexes.

    Create Index

    models

    the list of indexes to create

    createIndexOptions

    options to use when creating indexes

    returns

    a Observable with the names of the indexes

    Since

    2.2

  26. defcreateIndexes(models: Seq[IndexModel]): Observable[String]

    Create multiple indexes.

    Create multiple indexes.

    Create Index

    models

    the list of indexes to create

    returns

    a Observable with the names of the indexes

  27. defdeleteMany(clientSession: ClientSession, filter: Bson, options: DeleteOptions): SingleObservable[DeleteResult]

    Removes all documents from the collection that match the given query filter.

    Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to apply the the delete operation

    options

    the options to apply to the delete operation

    returns

    a Observable with a single element the DeleteResult or with an com.mongodb.MongoException

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  28. defdeleteMany(clientSession: ClientSession, filter: Bson): SingleObservable[DeleteResult]

    Removes all documents from the collection that match the given query filter.

    Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to apply the the delete operation

    returns

    a Observable with a single element the DeleteResult or with an com.mongodb.MongoException

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  29. defdeleteMany(filter: Bson, options: DeleteOptions): SingleObservable[DeleteResult]

    Removes all documents from the collection that match the given query filter.

    Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.

    filter

    the query filter to apply the the delete operation

    options

    the options to apply to the delete operation

    returns

    a Observable with a single element the DeleteResult or with an com.mongodb.MongoException

    Since

    1.2

  30. defdeleteMany(filter: Bson): SingleObservable[DeleteResult]

    Removes all documents from the collection that match the given query filter.

    Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.

    filter

    the query filter to apply the the delete operation

    returns

    a Observable with a single element the DeleteResult or with an com.mongodb.MongoException

  31. defdeleteOne(clientSession: ClientSession, filter: Bson, options: DeleteOptions): SingleObservable[DeleteResult]

    Removes at most one document from the collection that matches the given filter.

    Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to apply the the delete operation

    options

    the options to apply to the delete operation

    returns

    a Observable with a single element the DeleteResult or with an com.mongodb.MongoException

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  32. defdeleteOne(clientSession: ClientSession, filter: Bson): SingleObservable[DeleteResult]

    Removes at most one document from the collection that matches the given filter.

    Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to apply the the delete operation

    returns

    a Observable with a single element the DeleteResult or with an com.mongodb.MongoException

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  33. defdeleteOne(filter: Bson, options: DeleteOptions): SingleObservable[DeleteResult]

    Removes at most one document from the collection that matches the given filter.

    Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.

    filter

    the query filter to apply the the delete operation

    options

    the options to apply to the delete operation

    returns

    a Observable with a single element the DeleteResult or with an com.mongodb.MongoException

    Since

    1.2

  34. defdeleteOne(filter: Bson): SingleObservable[DeleteResult]

    Removes at most one document from the collection that matches the given filter.

    Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.

    filter

    the query filter to apply the the delete operation

    returns

    a Observable with a single element the DeleteResult or with an com.mongodb.MongoException

  35. defdistinct[C](clientSession: ClientSession, fieldName: String, filter: Bson)(implicit ct: ClassTag[C]): DistinctObservable[C]

    Gets the distinct values of the specified field name.

    Gets the distinct values of the specified field name.

    Distinct

    C

    the target type of the observable.

    clientSession

    the client session with which to associate this operation

    fieldName

    the field name

    filter

    the query filter

    returns

    a Observable emitting the sequence of distinct values

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  36. defdistinct[C](clientSession: ClientSession, fieldName: String)(implicit ct: ClassTag[C]): DistinctObservable[C]

    Gets the distinct values of the specified field name.

    Gets the distinct values of the specified field name.

    Distinct

    C

    the target type of the observable.

    clientSession

    the client session with which to associate this operation

    fieldName

    the field name

    returns

    a Observable emitting the sequence of distinct values

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  37. defdistinct[C](fieldName: String, filter: Bson)(implicit ct: ClassTag[C]): DistinctObservable[C]

    Gets the distinct values of the specified field name.

    Gets the distinct values of the specified field name.

    Distinct

    C

    the target type of the observable.

    fieldName

    the field name

    filter

    the query filter

    returns

    a Observable emitting the sequence of distinct values

  38. defdistinct[C](fieldName: String)(implicit ct: ClassTag[C]): DistinctObservable[C]

    Gets the distinct values of the specified field name.

    Gets the distinct values of the specified field name.

    Distinct

    C

    the target type of the observable.

    fieldName

    the field name

    returns

    a Observable emitting the sequence of distinct values

  39. lazy valdocumentClass: Class[TResult]

    Get the default class to cast any documents returned from the database into.

    Get the default class to cast any documents returned from the database into.

    returns

    the default class to cast any documents into

  40. defdrop(clientSession: ClientSession): SingleObservable[Completed]

    Drops this collection from the Database.

    Drops this collection from the Database.

    clientSession

    the client session with which to associate this operation

    returns

    a Observable with a single element indicating when the operation has completed Drop Collection

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  41. defdrop(): SingleObservable[Completed]

    Drops this collection from the Database.

    Drops this collection from the Database.

    returns

    a Observable with a single element indicating when the operation has completed Drop Collection

  42. defdropIndex(clientSession: ClientSession, keys: Bson, dropIndexOptions: DropIndexOptions): SingleObservable[Completed]

    Drops the index given the keys used to create it.

    Drops the index given the keys used to create it.

    clientSession

    the client session with which to associate this operation

    keys

    the keys of the index to remove

    dropIndexOptions

    options to use when dropping indexes

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  43. defdropIndex(clientSession: ClientSession, keys: Bson): SingleObservable[Completed]

    Drops the index given the keys used to create it.

    Drops the index given the keys used to create it.

    clientSession

    the client session with which to associate this operation

    keys

    the keys of the index to remove

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  44. defdropIndex(clientSession: ClientSession, indexName: String, dropIndexOptions: DropIndexOptions): SingleObservable[Completed]

    Drops the given index.

    Drops the given index.

    Drop Indexes

    clientSession

    the client session with which to associate this operation

    indexName

    the name of the index to remove

    dropIndexOptions

    options to use when dropping indexes

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  45. defdropIndex(clientSession: ClientSession, indexName: String): SingleObservable[Completed]

    Drops the given index.

    Drops the given index.

    Drop Indexes

    clientSession

    the client session with which to associate this operation

    indexName

    the name of the index to remove

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  46. defdropIndex(keys: Bson, dropIndexOptions: DropIndexOptions): SingleObservable[Completed]

    Drops the index given the keys used to create it.

    Drops the index given the keys used to create it.

    keys

    the keys of the index to remove

    dropIndexOptions

    options to use when dropping indexes

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

  47. defdropIndex(keys: Bson): SingleObservable[Completed]

    Drops the index given the keys used to create it.

    Drops the index given the keys used to create it.

    keys

    the keys of the index to remove

    returns

    a Observable with a single element indicating when the operation has completed

  48. defdropIndex(indexName: String, dropIndexOptions: DropIndexOptions): SingleObservable[Completed]

    Drops the given index.

    Drops the given index.

    Drop Indexes

    indexName

    the name of the index to remove

    dropIndexOptions

    options to use when dropping indexes

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

  49. defdropIndex(indexName: String): SingleObservable[Completed]

    Drops the given index.

    Drops the given index.

    Drop Indexes

    indexName

    the name of the index to remove

    returns

    a Observable with a single element indicating when the operation has completed

  50. defdropIndexes(clientSession: ClientSession, dropIndexOptions: DropIndexOptions): SingleObservable[Completed]

    Drop all the indexes on this collection, except for the default on _id.

    Drop all the indexes on this collection, except for the default on _id.

    Drop Indexes

    clientSession

    the client session with which to associate this operation

    dropIndexOptions

    options to use when dropping indexes

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  51. defdropIndexes(clientSession: ClientSession): SingleObservable[Completed]

    Drop all the indexes on this collection, except for the default on _id.

    Drop all the indexes on this collection, except for the default on _id.

    Drop Indexes

    clientSession

    the client session with which to associate this operation

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  52. defdropIndexes(dropIndexOptions: DropIndexOptions): SingleObservable[Completed]

    Drop all the indexes on this collection, except for the default on _id.

    Drop all the indexes on this collection, except for the default on _id.

    Drop Indexes

    dropIndexOptions

    options to use when dropping indexes

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

  53. defdropIndexes(): SingleObservable[Completed]

    Drop all the indexes on this collection, except for the default on _id.

    Drop all the indexes on this collection, except for the default on _id.

    Drop Indexes

    returns

    a Observable with a single element indicating when the operation has completed

  54. final defeq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  55. defestimatedDocumentCount(options: EstimatedDocumentCountOptions): SingleObservable[Long]

    Gets an estimate of the count of documents in a collection using collection metadata.

    Gets an estimate of the count of documents in a collection using collection metadata.

    options

    the options describing the count

    returns

    a publisher with a single element indicating the estimated number of documents

    Since

    2.4

  56. defestimatedDocumentCount(): SingleObservable[Long]

    Gets an estimate of the count of documents in a collection using collection metadata.

    Gets an estimate of the count of documents in a collection using collection metadata.

    returns

    a publisher with a single element indicating the estimated number of documents

    Since

    2.4

  57. deffinalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  58. deffind[C](clientSession: ClientSession, filter: Bson)(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): FindObservable[C]

    Finds all documents in the collection.

    Finds all documents in the collection.

    Find

    C

    the target document type of the observable.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter

    returns

    the find Observable

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  59. deffind[C](clientSession: ClientSession)(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): FindObservable[C]

    Finds all documents in the collection.

    Finds all documents in the collection.

    Find

    C

    the target document type of the observable.

    clientSession

    the client session with which to associate this operation

    returns

    the find Observable

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  60. deffind[C](filter: Bson)(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): FindObservable[C]

    Finds all documents in the collection.

    Finds all documents in the collection.

    Find

    C

    the target document type of the observable.

    filter

    the query filter

    returns

    the find Observable

  61. deffind[C]()(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): FindObservable[C]

    Finds all documents in the collection.

    Finds all documents in the collection.

    Find

    C

    the target document type of the observable.

    returns

    the find Observable

  62. deffindOneAndDelete(clientSession: ClientSession, filter: Bson, options: FindOneAndDeleteOptions): SingleObservable[TResult]

    Atomically find a document and remove it.

    Atomically find a document and remove it.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to find the document with

    options

    the options to apply to the operation

    returns

    a Observable with a single element the document that was removed. If no documents matched the query filter, then null will be returned

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  63. deffindOneAndDelete(clientSession: ClientSession, filter: Bson): SingleObservable[TResult]

    Atomically find a document and remove it.

    Atomically find a document and remove it.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to find the document with

    returns

    a Observable with a single element the document that was removed. If no documents matched the query filter, then null will be returned

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  64. deffindOneAndDelete(filter: Bson, options: FindOneAndDeleteOptions): SingleObservable[TResult]

    Atomically find a document and remove it.

    Atomically find a document and remove it.

    filter

    the query filter to find the document with

    options

    the options to apply to the operation

    returns

    a Observable with a single element the document that was removed. If no documents matched the query filter, then null will be returned

  65. deffindOneAndDelete(filter: Bson): SingleObservable[TResult]

    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 Observable with a single element the document that was removed. If no documents matched the query filter, then null will be returned

  66. deffindOneAndReplace(clientSession: ClientSession, filter: Bson, replacement: TResult, options: FindOneAndReplaceOptions): SingleObservable[TResult]

    Atomically find a document and replace it.

    Atomically find a document and replace it.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to apply the the replace operation

    replacement

    the replacement document

    options

    the options to apply to the operation

    returns

    a Observable with a single element the document that was replaced. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  67. deffindOneAndReplace(clientSession: ClientSession, filter: Bson, replacement: TResult): SingleObservable[TResult]

    Atomically find a document and replace it.

    Atomically find a document and replace it.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to apply the the replace operation

    replacement

    the replacement document

    returns

    a Observable with a single element the document that was replaced. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  68. deffindOneAndReplace(filter: Bson, replacement: TResult, options: FindOneAndReplaceOptions): SingleObservable[TResult]

    Atomically find a document and replace it.

    Atomically find a document and replace it.

    filter

    the query filter to apply the the replace operation

    replacement

    the replacement document

    options

    the options to apply to the operation

    returns

    a Observable with a single element the document that was replaced. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

  69. deffindOneAndReplace(filter: Bson, replacement: TResult): SingleObservable[TResult]

    Atomically find a document and replace it.

    Atomically find a document and replace it.

    filter

    the query filter to apply the the replace operation

    replacement

    the replacement document

    returns

    a Observable with a single element the document that was replaced. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

  70. deffindOneAndUpdate(clientSession: ClientSession, filter: Bson, update: Seq[Bson], options: FindOneAndUpdateOptions): SingleObservable[TResult]

    Atomically find a document and update it.

    Atomically find a document and update it.

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    options

    the options to apply to the operation

    returns

    a Observable with a single element the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  71. deffindOneAndUpdate(clientSession: ClientSession, filter: Bson, update: Seq[Bson]): SingleObservable[TResult]

    Atomically find a document and update it.

    Atomically find a document and update it.

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    returns

    a Observable with a single element the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  72. deffindOneAndUpdate(filter: Bson, update: Seq[Bson], options: FindOneAndUpdateOptions): SingleObservable[TResult]

    Atomically find a document and update it.

    Atomically find a document and update it.

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    options

    the options to apply to the operation

    returns

    a Observable with a single element the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  73. deffindOneAndUpdate(filter: Bson, update: Seq[Bson]): SingleObservable[TResult]

    Atomically find a document and update it.

    Atomically find a document and update it.

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    returns

    a Observable with a single element the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  74. deffindOneAndUpdate(clientSession: ClientSession, filter: Bson, update: Bson, options: FindOneAndUpdateOptions): SingleObservable[TResult]

    Atomically find a document and update it.

    Atomically find a document and update it.

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    options

    the options to apply to the operation

    returns

    a Observable with a single element the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  75. deffindOneAndUpdate(clientSession: ClientSession, filter: Bson, update: Bson): SingleObservable[TResult]

    Atomically find a document and update it.

    Atomically find a document and update it.

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    returns

    a Observable with a single element the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  76. deffindOneAndUpdate(filter: Bson, update: Bson, options: FindOneAndUpdateOptions): SingleObservable[TResult]

    Atomically find a document and update it.

    Atomically find a document and update it.

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    options

    the options to apply to the operation

    returns

    a Observable with a single element the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

  77. deffindOneAndUpdate(filter: Bson, update: Bson): SingleObservable[TResult]

    Atomically find a document and update it.

    Atomically find a document and update it.

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    returns

    a Observable with a single element the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be returned

  78. final defgetClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  79. definsertMany(clientSession: ClientSession, documents: Seq[_ <: TResult], options: InsertManyOptions): SingleObservable[Completed]

    Inserts a batch of documents.

    Inserts a batch of documents. The preferred way to perform bulk inserts is to use the BulkWrite API.

    clientSession

    the client session with which to associate this operation

    documents

    the documents to insert

    options

    the options to apply to the operation

    returns

    a Observable with a single element indicating when the operation has completed or with either a com.mongodb.DuplicateKeyException or com.mongodb.MongoException

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  80. definsertMany(clientSession: ClientSession, documents: Seq[_ <: TResult]): SingleObservable[Completed]

    Inserts a batch of documents.

    Inserts a batch of documents. The preferred way to perform bulk inserts is to use the BulkWrite API.

    clientSession

    the client session with which to associate this operation

    documents

    the documents to insert

    returns

    a Observable with a single element indicating when the operation has completed or with either a com.mongodb.DuplicateKeyException or com.mongodb.MongoException

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  81. definsertMany(documents: Seq[_ <: TResult], options: InsertManyOptions): SingleObservable[Completed]

    Inserts a batch of documents.

    Inserts a batch of documents. The preferred way to perform bulk inserts is to use the BulkWrite API. However, when talking with a server < 2.6, using this method will be faster due to constraints in the bulk API related to error handling.

    documents

    the documents to insert

    options

    the options to apply to the operation

    returns

    a Observable with a single element indicating when the operation has completed or with either a com.mongodb.DuplicateKeyException or com.mongodb.MongoException

  82. definsertMany(documents: Seq[_ <: TResult]): SingleObservable[Completed]

    Inserts a batch of documents.

    Inserts a batch of documents. The preferred way to perform bulk inserts is to use the BulkWrite API. However, when talking with a server < 2.6, using this method will be faster due to constraints in the bulk API related to error handling.

    documents

    the documents to insert

    returns

    a Observable with a single element indicating when the operation has completed or with either a com.mongodb.DuplicateKeyException or com.mongodb.MongoException

  83. definsertOne(clientSession: ClientSession, document: TResult, options: InsertOneOptions): SingleObservable[Completed]

    Inserts the provided document.

    Inserts the provided document. If the document is missing an identifier, the driver should generate one.

    clientSession

    the client session with which to associate this operation

    document

    the document to insert

    options

    the options to apply to the operation

    returns

    a Observable with a single element indicating when the operation has completed or with either a com.mongodb.DuplicateKeyException or com.mongodb.MongoException

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  84. definsertOne(clientSession: ClientSession, document: TResult): SingleObservable[Completed]

    Inserts the provided document.

    Inserts the provided document. If the document is missing an identifier, the driver should generate one.

    clientSession

    the client session with which to associate this operation

    document

    the document to insert

    returns

    a Observable with a single element indicating when the operation has completed or with either a com.mongodb.DuplicateKeyException or com.mongodb.MongoException

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  85. definsertOne(document: TResult, options: InsertOneOptions): SingleObservable[Completed]

    Inserts the provided document.

    Inserts the provided document. If the document is missing an identifier, the driver should generate one.

    document

    the document to insert

    options

    the options to apply to the operation

    returns

    a Observable with a single element indicating when the operation has completed or with either a com.mongodb.DuplicateKeyException or com.mongodb.MongoException

    Since

    1.1

  86. definsertOne(document: TResult): SingleObservable[Completed]

    Inserts the provided document.

    Inserts the provided document. If the document is missing an identifier, the driver should generate one.

    document

    the document to insert

    returns

    a Observable with a single element indicating when the operation has completed or with either a com.mongodb.DuplicateKeyException or com.mongodb.MongoException

  87. final defisInstanceOf[T0]: Boolean
    Definition Classes
    Any
  88. deflistIndexes[C](clientSession: ClientSession)(implicit e: DefaultsTo[C, Document], ct: ClassTag[C]): ListIndexesObservable[C]

    Get all the indexes in this collection.

    Get all the indexes in this collection.

    listIndexes

    C

    the target document type of the observable.

    clientSession

    the client session with which to associate this operation

    returns

    the fluent list indexes interface

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  89. deflistIndexes[C]()(implicit e: DefaultsTo[C, Document], ct: ClassTag[C]): ListIndexesObservable[C]

    Get all the indexes in this collection.

    Get all the indexes in this collection.

    listIndexes

    C

    the target document type of the observable.

    returns

    the fluent list indexes interface

  90. defmapReduce[C](clientSession: ClientSession, mapFunction: String, reduceFunction: String)(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): MapReduceObservable[C]

    Aggregates documents according to the specified map-reduce function.

    Aggregates documents according to the specified map-reduce function.

    C

    the target document type of the observable.

    clientSession

    the client session with which to associate this operation

    mapFunction

    A JavaScript function that associates or "maps" a value with a key and emits the key and value pair.

    reduceFunction

    A JavaScript function that "reduces" to a single object all the values associated with a particular key.

    returns

    a Observable containing the result of the map-reduce operation map-reduce

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  91. defmapReduce[C](mapFunction: String, reduceFunction: String)(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): MapReduceObservable[C]

    Aggregates documents according to the specified map-reduce function.

    Aggregates documents according to the specified map-reduce function.

    C

    the target document type of the observable.

    mapFunction

    A JavaScript function that associates or "maps" a value with a key and emits the key and value pair.

    reduceFunction

    A JavaScript function that "reduces" to a single object all the values associated with a particular key.

    returns

    a Observable containing the result of the map-reduce operation map-reduce

  92. lazy valnamespace: MongoNamespace

    Gets the namespace of this collection.

    Gets the namespace of this collection.

    returns

    the namespace

  93. final defne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  94. final defnotify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  95. final defnotifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  96. defproductElementNames: Iterator[String]
    Definition Classes
    Product
  97. lazy valreadConcern: ReadConcern

    Get the read concern for the MongoDatabase.

    Get the read concern for the MongoDatabase.

    returns

    the ReadConcern

    Since

    1.1

  98. lazy valreadPreference: ReadPreference

    Get the read preference for the MongoDatabase.

    Get the read preference for the MongoDatabase.

    returns

    the { @link com.mongodb.ReadPreference}

  99. defrenameCollection(clientSession: ClientSession, newCollectionNamespace: MongoNamespace, options: RenameCollectionOptions): SingleObservable[Completed]

    Rename the collection with oldCollectionName to the newCollectionName.

    Rename the collection with oldCollectionName to the newCollectionName.

    Rename collection

    clientSession

    the client session with which to associate this operation

    newCollectionNamespace

    the name the collection will be renamed to

    options

    the options for renaming a collection

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  100. defrenameCollection(clientSession: ClientSession, newCollectionNamespace: MongoNamespace): SingleObservable[Completed]

    Rename the collection with oldCollectionName to the newCollectionName.

    Rename the collection with oldCollectionName to the newCollectionName.

    Rename collection

    clientSession

    the client session with which to associate this operation

    newCollectionNamespace

    the name the collection will be renamed to

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  101. defrenameCollection(newCollectionNamespace: MongoNamespace, options: RenameCollectionOptions): SingleObservable[Completed]

    Rename the collection with oldCollectionName to the newCollectionName.

    Rename the collection with oldCollectionName to the newCollectionName.

    Rename collection

    newCollectionNamespace

    the name the collection will be renamed to

    options

    the options for renaming a collection

    returns

    a Observable with a single element indicating when the operation has completed

  102. defrenameCollection(newCollectionNamespace: MongoNamespace): SingleObservable[Completed]

    Rename the collection with oldCollectionName to the newCollectionName.

    Rename the collection with oldCollectionName to the newCollectionName.

    Rename collection

    newCollectionNamespace

    the name the collection will be renamed to

    returns

    a Observable with a single element indicating when the operation has completed

  103. defreplaceOne(clientSession: ClientSession, filter: Bson, replacement: TResult, options: ReplaceOptions): SingleObservable[UpdateResult]

    Replace a document in the collection according to the specified arguments.

    Replace a document in the collection according to the specified arguments.

    Replace

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to apply the the replace operation

    replacement

    the replacement document

    options

    the options to apply to the replace operation

    returns

    a Observable with a single element the UpdateResult

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  104. defreplaceOne(filter: Bson, replacement: TResult, options: ReplaceOptions): SingleObservable[UpdateResult]

    Replace a document in the collection according to the specified arguments.

    Replace a document in the collection according to the specified arguments.

    Replace

    filter

    the query filter to apply the the replace operation

    replacement

    the replacement document

    options

    the options to apply to the replace operation

    returns

    a Observable with a single element the UpdateResult

  105. defreplaceOne(clientSession: ClientSession, filter: Bson, replacement: TResult): SingleObservable[UpdateResult]

    Replace a document in the collection according to the specified arguments.

    Replace a document in the collection according to the specified arguments.

    Replace

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to apply the the replace operation

    replacement

    the replacement document

    returns

    a Observable with a single element the UpdateResult

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  106. defreplaceOne(filter: Bson, replacement: TResult): SingleObservable[UpdateResult]

    Replace a document in the collection according to the specified arguments.

    Replace a document in the collection according to the specified arguments.

    Replace

    filter

    the query filter to apply the the replace operation

    replacement

    the replacement document

    returns

    a Observable with a single element the UpdateResult

  107. final defsynchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  108. defupdateMany(clientSession: ClientSession, filter: Bson, update: Seq[Bson], options: UpdateOptions): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    options

    the options to apply to the update operation

    returns

    a Observable with a single element the UpdateResult

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  109. defupdateMany(clientSession: ClientSession, filter: Bson, update: Seq[Bson]): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    returns

    a Observable with a single element the UpdateResult

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  110. defupdateMany(filter: Bson, update: Seq[Bson], options: UpdateOptions): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    options

    the options to apply to the update operation

    returns

    a Observable with a single element the UpdateResult

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  111. defupdateMany(filter: Bson, update: Seq[Bson]): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    returns

    a Observable with a single element the UpdateResult

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  112. defupdateMany(clientSession: ClientSession, filter: Bson, update: Bson, options: UpdateOptions): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    options

    the options to apply to the update operation

    returns

    a Observable with a single element the UpdateResult

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  113. defupdateMany(clientSession: ClientSession, filter: Bson, update: Bson): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    returns

    a Observable with a single element the UpdateResult

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  114. defupdateMany(filter: Bson, update: Bson, options: UpdateOptions): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    options

    the options to apply to the update operation

    returns

    a Observable with a single element the UpdateResult

  115. defupdateMany(filter: Bson, update: Bson): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    returns

    a Observable with a single element the UpdateResult

  116. defupdateOne(clientSession: ClientSession, filter: Bson, update: Seq[Bson], options: UpdateOptions): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    options

    the options to apply to the update operation

    returns

    a Observable with a single element the UpdateResult

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  117. defupdateOne(clientSession: ClientSession, filter: Bson, update: Seq[Bson]): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    returns

    a Observable with a single element the UpdateResult

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  118. defupdateOne(filter: Bson, update: Seq[Bson], options: UpdateOptions): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    options

    the options to apply to the update operation

    returns

    a Observable with a single element the UpdateResult

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  119. defupdateOne(filter: Bson, update: Seq[Bson]): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a pipeline describing the update.

    returns

    a Observable with a single element the UpdateResult

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  120. defupdateOne(clientSession: ClientSession, filter: Bson, update: Bson, options: UpdateOptions): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    options

    the options to apply to the update operation

    returns

    a Observable with a single element the UpdateResult

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  121. defupdateOne(clientSession: ClientSession, filter: Bson, update: Bson): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    clientSession

    the client session with which to associate this operation

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    returns

    a Observable with a single element the UpdateResult

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  122. defupdateOne(filter: Bson, update: Bson, options: UpdateOptions): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    options

    the options to apply to the update operation

    returns

    a Observable with a single element the UpdateResult

  123. defupdateOne(filter: Bson, update: Bson): SingleObservable[UpdateResult]

    Update a single document in the collection according to the specified arguments.

    Update a single document in the collection according to the specified arguments.

    UpdatesUpdate Operators

    filter

    a document describing the query filter, which may not be null. This can be of any type for which a Codec is registered

    update

    a document describing the update, which may not be null. The update to apply must include only update operators. This can be of any type for which a Codec is registered

    returns

    a Observable with a single element the UpdateResult

  124. final defwait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  125. final defwait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  126. final defwait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])@native()
  127. defwatch[C](clientSession: ClientSession, pipeline: Seq[Bson])(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): ChangeStreamObservable[C]

    Creates a change stream for this collection.

    Creates a change stream for this collection.

    C

    the target document type of the observable.

    clientSession

    the client session with which to associate this operation

    pipeline

    the aggregation pipeline to apply to the change stream

    returns

    the change stream observable

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  128. defwatch[C](clientSession: ClientSession)(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): ChangeStreamObservable[C]

    Creates a change stream for this collection.

    Creates a change stream for this collection.

    C

    the target document type of the observable.

    clientSession

    the client session with which to associate this operation

    returns

    the change stream observable

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  129. defwatch[C](pipeline: Seq[Bson])(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): ChangeStreamObservable[C]

    Creates a change stream for this collection.

    Creates a change stream for this collection.

    C

    the target document type of the observable.

    pipeline

    the aggregation pipeline to apply to the change stream

    returns

    the change stream observable

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  130. defwatch[C]()(implicit e: DefaultsTo[C, TResult], ct: ClassTag[C]): ChangeStreamObservable[C]

    Creates a change stream for this collection.

    Creates a change stream for this collection.

    C

    the target document type of the observable.

    returns

    the change stream observable

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  131. defwithCodecRegistry(codecRegistry: CodecRegistry): MongoCollection[TResult]

    Create a new MongoCollection instance with a different codec registry.

    Create a new MongoCollection instance with a different codec registry.

    codecRegistry

    the new { @link org.bson.codecs.configuration.CodecRegistry} for the collection

    returns

    a new MongoCollection instance with the different codec registry

  132. defwithDocumentClass[C]()(implicit e: DefaultsTo[C, Document], ct: ClassTag[C]): MongoCollection[C]

    Create a new MongoCollection instance with a different default class to cast any documents returned from the database into..

    Create a new MongoCollection instance with a different default class to cast any documents returned from the database into..

    C

    The type that the new collection will encode documents from and decode documents to

    returns

    a new MongoCollection instance with the different default class

  133. defwithReadConcern(readConcern: ReadConcern): MongoCollection[TResult]

    Create a new MongoCollection instance with a different read concern.

    Create a new MongoCollection instance with a different read concern.

    readConcern

    the new ReadConcern for the collection

    returns

    a new MongoCollection instance with the different ReadConcern

    Since

    1.1

  134. defwithReadPreference(readPreference: ReadPreference): MongoCollection[TResult]

    Create a new MongoCollection instance with a different read preference.

    Create a new MongoCollection instance with a different read preference.

    readPreference

    the new { @link com.mongodb.ReadPreference} for the collection

    returns

    a new MongoCollection instance with the different readPreference

  135. defwithWriteConcern(writeConcern: WriteConcern): MongoCollection[TResult]

    Create a new MongoCollection instance with a different write concern.

    Create a new MongoCollection instance with a different write concern.

    writeConcern

    the new { @link com.mongodb.WriteConcern} for the collection

    returns

    a new MongoCollection instance with the different writeConcern

  136. lazy valwriteConcern: WriteConcern

    Get the write concern for the MongoDatabase.

    Get the write concern for the MongoDatabase.

    returns

    the { @link com.mongodb.WriteConcern}

Deprecated Value Members

  1. defcount(clientSession: ClientSession, filter: Bson, options: CountOptions): SingleObservable[Long]

    Counts the number of documents in the collection according to the given options.

    Counts the number of documents in the collection according to the given options.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter

    options

    the options describing the count

    returns

    a Observable with a single element indicating the number of documents

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) Use countDocuments instead of count()

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  2. defcount(clientSession: ClientSession, filter: Bson): SingleObservable[Long]

    Counts the number of documents in the collection according to the given options.

    Counts the number of documents in the collection according to the given options.

    clientSession

    the client session with which to associate this operation

    filter

    the query filter

    returns

    a Observable with a single element indicating the number of documents

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) Use countDocuments instead of count()

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  3. defcount(clientSession: ClientSession): SingleObservable[Long]

    Counts the number of documents in the collection.

    Counts the number of documents in the collection.

    clientSession

    the client session with which to associate this operation

    returns

    a Observable with a single element indicating the number of documents

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) Use countDocuments instead of count()

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  4. defcount(filter: Bson, options: CountOptions): SingleObservable[Long]

    Counts the number of documents in the collection according to the given options.

    Counts the number of documents in the collection according to the given options.

    filter

    the query filter

    options

    the options describing the count

    returns

    a Observable with a single element indicating the number of documents

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) Use countDocuments instead of count()

  5. defcount(filter: Bson): SingleObservable[Long]

    Counts the number of documents in the collection according to the given options.

    Counts the number of documents in the collection according to the given options.

    filter

    the query filter

    returns

    a Observable with a single element indicating the number of documents

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) Use countDocuments instead of count()

  6. defcount(): SingleObservable[Long]

    Counts the number of documents in the collection.

    Counts the number of documents in the collection.

    returns

    a Observable with a single element indicating the number of documents

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) Use countDocuments or estimatedDocumentCount() instead of count()

  7. defreplaceOne(clientSession: ClientSession, filter: Bson, replacement: TResult, options: UpdateOptions): SingleObservable[UpdateResult]

    Replace a document in the collection according to the specified arguments.

    Replace a document in the collection according to the specified arguments.

    Replace

    clientSession

    the client session with which to associate this operation

    filter

    the query filter to apply the the replace operation

    replacement

    the replacement document

    options

    the options to apply to the replace operation

    returns

    a Observable with a single element the UpdateResult

    Annotations
    @deprecated
    Deprecated

    (Since version 2.3) Use ReplaceOptions instead of UpdateOptions

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  8. defreplaceOne(filter: Bson, replacement: TResult, options: UpdateOptions): SingleObservable[UpdateResult]

    Replace a document in the collection according to the specified arguments.

    Replace a document in the collection according to the specified arguments.

    Replace

    filter

    the query filter to apply the the replace operation

    replacement

    the replacement document

    options

    the options to apply to the replace operation

    returns

    a Observable with a single element the UpdateResult

    Annotations
    @deprecated
    Deprecated

    (Since version 2.3) Use ReplaceOptions instead of UpdateOptions

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped

close