Packages

final class MongoCollectionF[T] extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MongoCollectionF
  2. AnyRef
  3. 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(pipeline: Seq[Bson]): AggregateQueryBuilder[T]

    Aggregates documents according to the specified aggregation pipeline.

    Aggregates documents according to the specified aggregation pipeline. Aggregation

    pipeline

    the aggregate pipeline

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException])
  7. def count[F[_]](filter: Bson, options: CountOptions)(implicit arg0: Async[F]): F[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

    Since

    2.4

  8. def count[F[_]](filter: Bson)(implicit arg0: Async[F]): F[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

    Since

    2.4

  9. def count[F[_]](implicit arg0: Async[F]): F[Long]

    Counts the number of documents in the collection.

    Counts the number of documents in the collection.

    Since

    2.4

  10. def createIndex[F[_]](filter: Bson, options: IndexOptions)(implicit arg0: Async[F]): F[String]

    Create Index

    filter

    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

  11. def createIndex[F[_]](filters: Bson)(implicit arg0: Async[F]): F[String]

    Create Index

    filters

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

  12. def deleteMany[F[_]](filter: Bson, options: DeleteOptions)(implicit arg0: Async[F]): F[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

    Since

    1.2

  13. def deleteMany[F[_]](filters: Bson)(implicit arg0: Async[F]): F[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.

    filters

    the query filter to apply the the delete operation

  14. def deleteOne[F[_]](filter: Bson, options: DeleteOptions)(implicit arg0: Async[F]): F[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

    Since

    1.2

  15. def deleteOne[F[_]](filters: Bson)(implicit arg0: Async[F]): F[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.

    filters

    the query filter to apply the the delete operation

  16. def distinct(fieldName: String, filter: Bson): DistinctQueryBuilder[T]

    Gets the distinct values of the specified field name.

    Gets the distinct values of the specified field name.

    Distinct

    fieldName

    the field name

    filter

    the query filter

  17. def distinct(fieldName: String): DistinctQueryBuilder[T]

    Gets the distinct values of the specified field name.

    Gets the distinct values of the specified field name. Distinct

    fieldName

    the field name

  18. def documentClass: Class[T]
  19. def drop[F[_]]()(implicit arg0: Async[F]): F[Unit]

    Drops this collection from the Database.

    Drops this collection from the Database.

    Drop Collection

  20. def dropIndex[F[_]](keys: Bson, options: DropIndexOptions)(implicit arg0: Async[F]): F[Unit]

    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

    options

    options to use when dropping indexes

    Since

    2.2

  21. def dropIndex[F[_]](keys: Bson)(implicit arg0: Async[F]): F[Unit]

    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

  22. def dropIndex[F[_]](name: String)(implicit arg0: Async[F]): F[Unit]

    Drops the given index.

    Drops the given index.

    Drop Indexes

    name

    the name of the index to remove

  23. def dropIndexes[F[_]]()(implicit arg0: Async[F]): F[Unit]

    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

  24. def dropIndexes[F[_]](options: DropIndexOptions)(implicit arg0: Async[F]): F[Unit]

    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

    options

    options to use when dropping indexes

    Since

    2.2

  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  27. def find(filter: Bson): FindQueryBuilder[T]

    Finds all documents in the collection.

    Finds all documents in the collection.

    Find

    filter

    the query filter

  28. def find: FindQueryBuilder[T]

    Finds all documents in the collection.

    Finds all documents in the collection.

    Find

  29. def findOneAndDelete[F[_]](filter: Bson, options: FindOneAndDeleteOptions)(implicit arg0: Async[F]): F[T]

    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

    Note

    If no documents matched the query filter, then null will be returned

  30. def findOneAndDelete[F[_]](filter: Bson)(implicit arg0: Async[F]): F[T]

    Atomically find a document and remove it.

    Atomically find a document and remove it.

    filter

    the query filter to find the document with

    Note

    If no documents matched the query filter, then null will be returned

  31. def findOneAndReplace[F[_]](filter: Bson, replacement: T, options: FindOneAndReplaceOptions)(implicit arg0: Async[F]): F[T]

    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

    Note

    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

  32. def findOneAndReplace[F[_]](filter: Bson, replacement: T)(implicit arg0: Async[F]): F[T]

    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

    Note

    If no documents matched the query filter, then null will be returned

  33. def findOneAndUpdate[F[_]](filter: Bson, update: Bson, options: FindOneAndUpdateOptions)(implicit arg0: Async[F]): F[T]

    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

    Note

    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

  34. def findOneAndUpdate[F[_]](filter: Bson, update: Bson)(implicit arg0: Async[F]): F[T]

    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

    Note

    If no documents matched the query filter, then null will be returned

  35. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  36. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  37. def insertMany[F[_]](documents: Seq[T], options: InsertManyOptions)(implicit arg0: Async[F]): F[InsertManyResult]

    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

  38. def insertMany[F[_]](documents: Seq[T])(implicit arg0: Async[F]): F[InsertManyResult]

    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

  39. def insertOne[F[_]](document: T, options: InsertOneOptions)(implicit arg0: Async[F]): F[InsertOneResult]

    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

    Since

    1.1

  40. def insertOne[F[_]](document: T)(implicit arg0: Async[F]): F[InsertOneResult]

    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

  41. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  42. def namespace: MongoNamespace
  43. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  44. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  45. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. def replaceOne[F[_]](filter: Bson, replacement: T, options: ReplaceOptions)(implicit arg0: Async[F]): F[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

  47. def replaceOne[F[_]](filters: Bson, replacement: T)(implicit arg0: Async[F]): F[UpdateResult]

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

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

    Replace

    filters

    the query filter to apply the the replace operation

    replacement

    the replacement document

  48. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  49. def toString(): String
    Definition Classes
    AnyRef → Any
  50. def updateMany[F[_]](filter: Bson, update: Seq[Bson], options: UpdateOptions)(implicit arg0: Async[F]): F[UpdateResult]

    Update all documents in the collection according to the specified arguments.

    Update all documents in the collection according to the specified arguments.

    Updates Update 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

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  51. def updateMany[F[_]](filter: Bson, update: Bson, options: UpdateOptions)(implicit arg0: Async[F]): F[UpdateResult]

    Update all documents in the collection according to the specified arguments.

    Update all documents in the collection according to the specified arguments.

    Updates Update 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

  52. def updateMany[F[_]](filters: Bson, update: Seq[Bson])(implicit arg0: Async[F]): F[UpdateResult]

    Update all documents in the collection according to the specified arguments.

    Update all documents in the collection according to the specified arguments.

    Updates Update Operators

    filters

    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.

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  53. def updateMany[F[_]](filters: Bson, update: Bson)(implicit arg0: Async[F]): F[UpdateResult]

    Update all documents in the collection according to the specified arguments.

    Update all documents in the collection according to the specified arguments.

    Updates Update Operators

    filters

    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

  54. def updateOne[F[_]](filter: Bson, update: Seq[Bson], options: UpdateOptions)(implicit arg0: Async[F]): F[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.

    Updates Update 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

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  55. def updateOne[F[_]](filter: Bson, update: Bson, options: UpdateOptions)(implicit arg0: Async[F]): F[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.

    Updates Update 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

  56. def updateOne[F[_]](filters: Bson, update: Seq[Bson])(implicit arg0: Async[F]): F[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.

    Updates Update Operators

    filters

    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

    Since

    2.7

    Note

    Requires MongoDB 4.2 or greater

  57. def updateOne[F[_]](filters: Bson, update: Bson)(implicit arg0: Async[F]): F[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.

    Updates Update Operators

    filters

    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

  58. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  59. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  60. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  61. def watch: WatchQueryBuilder[T]

    Creates a change stream for this collection.

    Creates a change stream for this collection.

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  62. def watch(pipeline: Seq[Bson]): WatchQueryBuilder[T]

    Creates a change stream for this collection.

    Creates a change stream for this collection.

    pipeline

    the aggregation pipeline to apply to the change stream

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped