Converts this collection to a capped one.
Converts this collection to a capped one.
the size of the collection (number of bytes)
the maximum number of documents this capped collection can contain
Creates this collection.
Creates this collection.
The returned future will be completed with an error if this collection already exists.
coll.create().recover { case CommandError.Code(48 /*NamespaceExists*/) => println(s"Collection ${coll.fullCollectionName} already exists") }
Creates this collection as a capped one.
Creates this collection as a capped one.
The returned future will be completed with an error if this collection already exists.
the size of the collection (number of bytes)
the maximum number of documents this capped collection can contain
If true should automatically add an index on the _id
field. By default, regular collections will have an indexed _id
field, in contrast to capped collections. This MongoDB option is deprecated and will be removed in a future release.
Drops this collection.
Drops this collection.
If the collection existed and is successfully dropped, the returned future will be completed with true.
If failIfNotFound
is false and the collection doesn't exist,
the returned future will be completed with false.
Otherwise in case, the future will be completed with the encountered error.
Returns an index manager for this collection.
Returns various information about this collection.
Returns various information about this collection.
the scale factor (for example, to get all the sizes in kilobytes)
Returns various information about this collection.
(collectionMetaCommands: StringAdd).self
(collectionMetaCommands: StringFormat).self
DEPRECATED: If true should automatically add an index on the _id
field. By default, regular collections will have an indexed _id
field, in contrast to capped collections. This MongoDB option is deprecated and will be removed in a future release.
(Since version 0.14.0) Use create
without deprecated autoIndexId
Drops this collection.
Drops this collection.
The returned future will be completed with an error if this collection does not exist.
(Since version 0.12.0) Use drop(Boolean)
Renames this collection.
Renames this collection.
the new name of this collection
if a collection of name to
already exists, then drops that collection before renaming this one
a failure if the dropExisting option is false and the target collection already exists
(Since version 0.12.4) Use reactivemongo.api.DBMetaCommands.renameCollection on the admin database instead.
(collectionMetaCommands: ArrowAssoc[CollectionMetaCommands]).x
(Since version 2.10.0) Use leftOfArrow
instead
(collectionMetaCommands: Ensuring[CollectionMetaCommands]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
A mixin that provides commands about this Collection itself.