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.
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.
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.
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
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.
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)
If this collection is capped, removes all the documents it contains.
If this collection is capped, removes all the documents it contains.
Deprecated because it became an internal command, unavailable by default.
(Since version 0.9) Deprecated because emptyCapped became an internal command, unavailable by default.
A mixin that provides commands about this Collection itself.