final class MongoCollectionF[T] extends AnyRef
- Alphabetic
- By Inheritance
- MongoCollectionF
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
aggregate(pipeline: Seq[Bson]): AggregateQueryBuilder[T]
Aggregates documents according to the specified aggregation pipeline.
Aggregates documents according to the specified aggregation pipeline. Aggregation
- pipeline
the aggregate pipeline
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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
-
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
-
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
-
def
createIndex[F[_]](filter: Bson, options: IndexOptions)(implicit arg0: Async[F]): F[String]
- 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
-
def
createIndex[F[_]](filters: Bson)(implicit arg0: Async[F]): F[String]
- 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
-
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
-
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
-
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
-
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
-
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.
- fieldName
the field name
- filter
the query filter
-
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
- def documentClass: Class[T]
-
def
drop[F[_]]()(implicit arg0: Async[F]): F[Unit]
Drops this collection from the Database.
Drops this collection from the Database.
-
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
-
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
-
def
dropIndex[F[_]](name: String)(implicit arg0: Async[F]): F[Unit]
Drops the given index.
Drops the given index.
- name
the name of the index to remove
-
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.
-
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.
- options
options to use when dropping indexes
- Since
2.2
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
find(filter: Bson): FindQueryBuilder[T]
Finds all documents in the collection.
Finds all documents in the collection.
- filter
the query filter
-
def
find: FindQueryBuilder[T]
Finds all documents in the collection.
Finds all documents in the collection.
-
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
-
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
-
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
-
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
-
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
-
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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
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
-
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
-
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
-
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
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def namespace: MongoNamespace
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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.
- filter
the query filter to apply the the replace operation
- replacement
the replacement document
- options
the options to apply to the replace operation
-
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.
- filters
the query filter to apply the the replace operation
- replacement
the replacement document
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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.
- 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
-
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.
- 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
-
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.
- 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
-
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.
- 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
-
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.
- 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
-
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.
- 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
-
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.
- 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
-
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.
- 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
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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
-
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
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated