package commands
- Alphabetic
- By Inheritance
- commands
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
AggregationFramework[P <: SerializationPack] extends ImplicitCommandHelpers[P] with GroupAggregation[P] with SliceAggregation[P] with AggregationPipeline[P]
Implements the Aggregation Framework.
- trait BoxedAnyVal[A <: AnyVal] extends AnyRef
-
case class
CollStatsResult(ns: String, count: Int, size: Double, averageObjectSize: Option[Double], storageSize: Double, numExtents: Option[Int], nindexes: Int, lastExtentSize: Option[Int], paddingFactor: Option[Double], systemFlags: Option[Int], userFlags: Option[Int], totalIndexSize: Int, sizePerIndex: List[(String, Int)], capped: Boolean, max: Option[Long], maxSize: Option[Double] = None) extends Product with Serializable
Various information about a collection.
Various information about a collection.
- ns
The fully qualified collection name.
- count
The number of documents in this collection.
- size
The size in bytes (or in bytes / scale, if any).
- averageObjectSize
The average object size in bytes (or in bytes / scale, if any).
- storageSize
Preallocated space for the collection.
- numExtents
Number of extents (contiguously allocated chunks of datafile space, only for mmapv1 storage engine).
- nindexes
Number of indexes.
- lastExtentSize
Size of the most recently created extent (only for mmapv1 storage engine).
- paddingFactor
Padding can speed up updates if documents grow (only for mmapv1 storage engine).
- systemFlags
System flags.
- userFlags
User flags.
- capped
States if this collection is capped.
- max
The maximum number of documents of this collection, if capped.
- maxSize
The maximum size in bytes (or in bytes / scale, if any) of this collection, if capped.
-
final
class
Collation extends AnyRef
Represents a collection, view, index or operation specific collation.
- trait CollectionCommand extends AbstractCommand
- trait Command extends AbstractCommand
-
trait
CommandError extends Exception with NoStackTrace
Base definition for all the errors for the command execution errors.
- trait CommandWithPack[P <: SerializationPack] extends AnyRef
- trait CommandWithResult[R] extends AnyRef
-
trait
CursorFetcher[P <: SerializationPack, +C[_] <: Cursor[_]] extends AnyRef
Fetches a cursor from MongoDB results.
Fetches a cursor from MongoDB results.
- P
the type of the serialization pack
- C
the type of the cursor implementation
- final case class DBHashResult(host: String, collectionHashes: Map[String, String], md5: String, timeMillis: Long) extends Product with Serializable
-
case class
DBUserRole(name: String, db: String) extends UserRole with Product with Serializable
- db
the name of the database
- trait ImplicitCommandHelpers[P <: SerializationPack] extends AnyRef
- case class LastError(ok: Boolean, errmsg: Option[String], code: Option[Int], lastOp: Option[Long], n: Int, singleShard: Option[String], updatedExisting: Boolean, upserted: Option[BSONValue], wnote: Option[W], wtimeout: Boolean, waited: Option[Int], wtime: Option[Int], writeErrors: Seq[WriteError] = Nil, writeConcernError: Option[WriteConcernError] = None) extends Exception with DatabaseException with WriteResult with NoStackTrace with Product with Serializable
- case class MultiBulkWriteResult(ok: Boolean, n: Int, nModified: Int, upserted: Seq[Upserted], writeErrors: Seq[WriteError], writeConcernError: Option[WriteConcernError], code: Option[Int], errmsg: Option[String], totalN: Int) extends Product with Serializable
-
case class
ReplSetMember(_id: Long, name: String, health: Int, state: Int, stateStr: String, uptime: Long, optime: Long, lastHeartbeat: Option[Long], lastHeartbeatRecv: Option[Long], lastHeartbeatMessage: Option[String], electionTime: Option[Long], self: Boolean, pingMs: Option[Long], syncingTo: Option[String], configVersion: Option[Int]) extends Product with Serializable
Replica set member.
Replica set member.
- name
the member name (e.g. "host:port")
- health
the health indicator for this member
- state
the state code of the member
- stateStr
the string representation of the state
- uptime
the number of seconds that this member has been online
- optime
information regarding the last operation from the operation log that this member has applied
- lastHeartbeat
the time of the transmission time of last heartbeat received from this member
- lastHeartbeatRecv
the time that the last heartbeat was received from this member
- lastHeartbeatMessage
an optional message from the last heartbeat
- electionTime
if the member is the primary, the time it was elected as
- self
indicates which replica set member processed the replSetGetStatus command
- pingMs
the number of milliseconds (ms) that a round-trip packet takes to travel between the remote member and the local instance (does not appear for the member that returns the
rs.status()
data)- syncingTo
the hostname of the member from which this instance is syncing (only present on the output of
rs.status()
on secondary and recovering members)- configVersion
the configuration version (since MongoDB 3.0)
-
case class
ReplSetStatus(name: String, time: Long, myState: Int, members: List[ReplSetMember]) extends Product with Serializable
Result from the replSetGetStatus.
Result from the replSetGetStatus.
- name
the name of the replica set
- time
the current server time
- members
the list of the members of this replicate set
-
final
case class
ResolvedCollectionCommand[C <: CollectionCommand](collection: String, command: C) extends Command with Product with Serializable
- collection
the name of the collection against which the command is executed
- command
the executed command
-
case class
ResultCursor(cursorId: Long, fullCollectionName: String) extends Product with Serializable
- cursorId
the ID of the cursor
- fullCollectionName
the namespace of the collection
- sealed trait ServerProcess extends AnyRef
-
case class
ServerStatusAsserts(regular: Int, warning: Int, msg: Int, user: Int, rollovers: Int) extends Product with Serializable
- regular
the number of regular assertions
- warning
the number of warnings
- msg
the number of message assertions
- user
the number of user assertions
- rollovers
the number of times that the rollovers counters have rolled over since the last time the MongoDB process started
- See also
https://docs.mongodb.com/manual/reference/command/serverStatus/
-
case class
ServerStatusBackgroundFlushing(flushes: Int, totalMs: Long, averageMs: Long, lastMs: Long, lastFinished: Long) extends Product with Serializable
Only for the MMAPv1 storage engine.
Only for the MMAPv1 storage engine.
- flushes
the number of times the database has flushed all writes
- totalMs
the total number of milliseconds (ms) that the mongod processes have spent writing
- averageMs
the average time in milliseconds for each flush to disk
- lastMs
the amount of time, in milliseconds, that the last flush operation took to complete
- lastFinished
the timestamp of the last completed flush operation
- See also
https://docs.mongodb.com/manual/reference/command/serverStatus/
-
case class
ServerStatusConnections(current: Int, available: Int, totalCreated: Long) extends Product with Serializable
- current
the number of incoming connections from clients to the database server
- available
the number of unused incoming connections available
- totalCreated
the count of all incoming connections created to the server.
- See also
https://docs.mongodb.com/manual/reference/command/serverStatus/
-
case class
ServerStatusExtraInfo(heapUsageBytes: Int, pageFaults: Int) extends Product with Serializable
- heapUsageBytes
the total size in bytes of heap space used by the database process
- pageFaults
the total number of page faults
- See also
https://docs.mongodb.com/manual/reference/command/serverStatus/
-
case class
ServerStatusGlobalLock(totalTime: Int, currentQueue: ServerStatusLock, activeClients: ServerStatusLock) extends Product with Serializable
- totalTime
the time, in microseconds, since the database last started and created the globalLock
- currentQueue
the information concerning the number of operations queued because of a lock
- activeClients
the information about the number of connected clients
- See also
https://docs.mongodb.com/manual/reference/command/serverStatus/
-
case class
ServerStatusJournaling(commits: Int, journaledMB: Double, writeToDataFilesMB: Double, compression: Double, commitsInWriteLock: Int, earlyCommits: Int, timeMs: ServerStatusJournalingTime) extends Product with Serializable
Only for the MMAPv1 storage engine with the journaling enabled.
Only for the MMAPv1 storage engine with the journaling enabled.
- commits
the number of transactions written to the journal during the last journal group commit interval
- journaledMB
the amount of data in megabytes (MB) written to journal
- writeToDataFilesMB
the amount of data in megabytes (MB) written from journal
- compression
the compression ratio of the data written to the journal
- commitsInWriteLock
the count of the commits that occurred while a write lock was held
- earlyCommits
the number of times MongoDB requested a commit
- See also
https://docs.mongodb.com/manual/reference/command/serverStatus/
-
case class
ServerStatusJournalingTime(dt: Long, prepLogBuffer: Long, writeToJournal: Long, writeToDataFiles: Long, remapPrivateView: Long, commits: Long, commitsInWriteLock: Long) extends Product with Serializable
Only for the MMAPv1 storage engine with the journaling enabled.
Only for the MMAPv1 storage engine with the journaling enabled.
- dt
the amount of time in milliseconds, over which MongoDB collected this information
- prepLogBuffer
the amount of time, in milliseconds, spent preparing to write to the journal
- writeToJournal
the amount of time, in milliseconds, spent actually writing to the journal
- writeToDataFiles
the amount of time, in milliseconds, spent writing to data files after journaling
- remapPrivateView
the amount of time, in milliseconds, spent remapping copy-on-write memory mapped views
- commits
the amount of time in milliseconds spent for commits
- commitsInWriteLock
the amount of time, in milliseconds, spent for commits that occurred while a write lock was held
- See also
https://docs.mongodb.com/manual/reference/command/serverStatus/ ServerStatusJournaling
-
case class
ServerStatusLock(total: Int, readers: Int, writers: Int) extends Product with Serializable
- total
the total number of operations queued waiting for the lock
- readers
the number of operations that are currently queued and waiting for the read lock
- writers
the number of operations that are currently queued and waiting for the write lock
- See also
https://docs.mongodb.com/manual/reference/command/serverStatus/
-
case class
ServerStatusNetwork(bytesIn: Int, bytesOut: Int, numRequests: Int) extends Product with Serializable
- bytesIn
the number of bytes that reflects the amount of network traffic received by this database
- bytesOut
the number of bytes that reflects the amount of network traffic sent from this database
- numRequests
the total number of distinct requests that the server has received
- See also
https://docs.mongodb.com/manual/reference/command/serverStatus/
-
case class
ServerStatusResult(host: String, version: String, process: ServerProcess, pid: Long, uptime: Long, uptimeMillis: Long, uptimeEstimate: Long, localTime: Long, advisoryHostFQDNs: List[String], asserts: ServerStatusAsserts, backgroundFlushing: Option[ServerStatusBackgroundFlushing], connections: ServerStatusConnections, dur: Option[ServerStatusJournaling], extraInfo: Option[ServerStatusExtraInfo], globalLock: ServerStatusGlobalLock, network: ServerStatusNetwork) extends Product with Serializable
- host
the system hostname
- version
the MongoDB version
- process
the MongoDB process
- pid
the process ID
- uptime
the number of seconds this process has been active
- uptimeMillis
same as
uptime
but with millisecond precision- uptimeEstimate
the uptime in seconds as calculated from MongoDB’s internal course-grained time keeping system
- localTime
the UTC representation of the current server time
- advisoryHostFQDNs
since MongoDB 3.2 (otherwise empty), the array of system fully qualified names
- asserts
the statistics about the assertions raised by the MongoDB process since it starts
- backgroundFlushing
the report on the periodic writes to disk (only for the MMAPv1 storage engine)
- connections
the report about the status of the connection
- dur
the report about the mongod instance’s journaling-related operations (only for the MMAPv1 storage engine with the journaling enabled)
- extraInfo
the additional information regarding the underlying system
- globalLock
the report about the database lock state
- network
the report about the MongoDB network use
- See also
@see https://docs.mongodb.com/manual/reference/command/serverStatus/
- case class UpdateWriteResult(ok: Boolean, n: Int, nModified: Int, upserted: Seq[Upserted], writeErrors: Seq[WriteError], writeConcernError: Option[WriteConcernError], code: Option[Int], errmsg: Option[String]) extends WriteResult with Product with Serializable
- case class Upserted(index: Int, _id: BSONValue) extends Product with Serializable
- class UserRole extends AnyRef
-
case class
WriteConcernError(code: Int, errmsg: String) extends Product with Serializable
- code
the error code
- errmsg
the error message
-
case class
WriteError(index: Int, code: Int, errmsg: String) extends Product with Serializable
- code
the error code
- errmsg
the error message
- sealed trait WriteResult extends AnyRef
-
sealed
trait
AbstractCommand extends AnyRef
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Will be removed; See
Command
-
case class
Capped(size: Long, max: Option[Int] = None) extends Product with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
CollStats(scale: Option[Int] = None) extends CollectionCommand with CommandWithResult[CollStatsResult] with Product with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
CollectionNames(names: List[String]) extends Product with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
ConvertToCapped(capped: Capped) extends CollectionCommand with CommandWithResult[UnitBox.type] with Product with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
trait
CountCommand[P <: SerializationPack] extends ImplicitCommandHelpers[P]
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Use new
reactivemongo.api.collections.CountOp
-
case class
Create(capped: Option[Capped] = None, autoIndexId: Boolean = true, flags: Int = 1) extends CollectionCommand with CommandWithResult[UnitBox.type] with Product with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
CreateIndexes(db: String, indexes: List[Index]) extends CollectionCommand with CommandWithResult[WriteResult] with Product with Serializable
Creates the given indexes on the specified collection.
Creates the given indexes on the specified collection.
- db
the database name
- indexes
the indexes to be created
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
trait
CreateUserCommand[P <: SerializationPack] extends ImplicitCommandHelpers[P]
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
DefaultWriteResult(ok: Boolean, n: Int, writeErrors: Seq[WriteError], writeConcernError: Option[WriteConcernError], code: Option[Int], errmsg: Option[String]) extends WriteResult with Product with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
trait
DeleteCommand[P <: SerializationPack] extends ImplicitCommandHelpers[P]
Implements the delete command.
Implements the delete command.
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Use the new
delete
operation
-
trait
DistinctCommand[P <: SerializationPack] extends ImplicitCommandHelpers[P]
The distinct command.
The distinct command.
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Use
.distinct
on collection
-
case class
DropCollectionResult(dropped: Boolean) extends Product with Serializable
- dropped
true if the collection existed and was dropped
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
DropIndexes(index: String) extends CollectionCommand with CommandWithResult[DropIndexesResult] with Product with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
DropIndexesResult(value: Int) extends BoxedAnyVal[Int] with Product with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
trait
FindAndModifyCommand[P <: SerializationPack] extends ImplicitCommandHelpers[P]
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
GetLastError(w: W, j: Boolean, fsync: Boolean, wtimeout: Option[Int] = None) extends Command with api.WriteConcern with CommandWithResult[LastError] with Product with Serializable
- wtimeout
the time limit
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Will be replaced by
reactivemongo.api.commands.WriteConcern
-
trait
InsertCommand[P <: SerializationPack] extends ImplicitCommandHelpers[P]
Implements the insert command.
Implements the insert command.
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Use the new insert operation
-
trait
IsMasterCommand[P <: SerializationPack] extends AnyRef
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
ListIndexes(db: String) extends CollectionCommand with CommandWithResult[List[Index]] with Product with Serializable
Lists the indexes of the specified collection.
Lists the indexes of the specified collection.
- db
the database name
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
trait
Mongo26WriteCommand extends AnyRef
- Annotations
- @deprecated
- Deprecated
(Since version 0.12.7) Will be removed as EOL for 2.6
-
case class
RenameCollection(fullyQualifiedCollectionName: String, fullyQualifiedTargetName: String, dropTarget: Boolean = false) extends Command with CommandWithResult[UnitBox.type] with Product with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
ReplSetMaintenance(enable: Boolean = true) extends Command with CommandWithResult[UnitBox.type] with Product with Serializable
The replSetMaintenance command.
The replSetMaintenance command. It must be executed against the
admin
database.- enable
if true the the member enters the
RECOVERING
state
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
case class
ResponseResult[R](response: Response, numberToReturn: Int, value: R) extends Product with Serializable
- response
the response associated with the result
- numberToReturn
the number of documents to return
- value
the value parsed from the response
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
trait
UpdateCommand[P <: SerializationPack] extends ImplicitCommandHelpers[P]
Implements the update command.
Implements the update command.
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Use the new update operation
-
type
WriteConcern = GetLastError
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Will be replaced by
reactivemongo.api.commands.WriteConcern
Value Members
- object Collation
- object Command
- object CommandError extends Serializable
- object MongodProcess extends ServerProcess with Product with Serializable
- object MongosProcess extends ServerProcess with Product with Serializable
- object MultiBulkWriteResult extends Serializable
- object ResyncResult extends BoxedAnyVal[Unit]
- object ServerProcess
- object UnitBox extends BoxedAnyVal[Unit]
-
object
UserRole
User role extractor
- object WriteResult
Deprecated Value Members
-
val
WriteConcern: GetLastError.type
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Will be replaced by
reactivemongo.api.commands.WriteConcern
-
object
DropCollection extends CollectionCommand with CommandWithResult[DropCollectionResult]
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
object
DropDatabase extends Command with CommandWithResult[UnitBox.type]
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
object
EmptyCapped extends CollectionCommand with CommandWithResult[UnitBox.type]
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
object
GetLastError extends Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Will be replaced by
reactivemongo.api.commands.WriteConcern
-
object
ListCollectionNames extends Command with CommandWithResult[CollectionNames]
List the names of DB collections.
List the names of DB collections.
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
object
PingCommand extends Command with CommandWithResult[Boolean] with Product with Serializable
The ping command.
The ping command.
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
object
ReplSetGetStatus extends Command with CommandWithResult[ReplSetStatus] with Product with Serializable
The command replSetGetStatus
The command replSetGetStatus
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
object
Resync extends Command with CommandWithResult[ResyncResult.type]
The command resync
The command resync
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private
-
object
ServerStatus extends Command with CommandWithResult[ServerStatusResult] with Product with Serializable
Server status
Server status
- Annotations
- @deprecated
- Deprecated
(Since version 0.16.0) Internal: will be made private