Package

reactivemongo.core

commands

Permalink

package commands

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. commands
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. case class AddToSet(field: String) extends GroupFunction with Product with Serializable

    Permalink
  2. trait AdminCommand[Result] extends Command[Result]

    Permalink

    A command that targets the admin database only (administrative commands).

  3. case class Ascending(field: String) extends SortOrder with Product with Serializable

    Permalink
  4. sealed trait AuthenticationResult extends AnyRef

    Permalink

    an authentication result

  5. case class Avg(field: String) extends GroupFunction with Product with Serializable

    Permalink
  6. trait BSONCommandError extends Exception with CommandError

    Permalink

    A command error that optionally holds the original TraversableBSONDocument

  7. trait BSONCommandResultMaker[Result] extends CommandResultMaker[Result]

    Permalink
  8. case class CappedOptions(size: Long, maxDocuments: Option[Int] = None) extends Product with Serializable

    Permalink
  9. case class CollStatsResult(ns: String, count: Int, size: Double, averageObjectSize: Option[Double], storageSize: Double, numExtents: Int, nindexes: Int, lastExtentSize: Option[Int], paddingFactor: Option[Double], systemFlags: Option[Int], userFlags: Option[Int], totalIndexSize: Int, indexSizes: Array[(String, Int)], capped: Boolean, max: Option[Long]) extends Product with Serializable

    Permalink

    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).

    nindexes

    Number of indexes.

    lastExtentSize

    Size of the most recently created extent.

    paddingFactor

    Padding can speed up updates if documents grow.

    systemFlags

    System flags.

    userFlags

    User flags.

    indexSizes

    Size of specific indexes in bytes.

    capped

    States if this collection is capped.

    max

    The maximum number of documents of this collection, if capped.

  10. trait Command[Result] extends AnyRef

    Permalink

    A MongoDB Command.

    A MongoDB Command.

    Basically, it's as query that is performed on any db.$cmd collection and gives back one document as a result.

  11. trait CommandError extends Exception with ReactiveMongoException

    Permalink

    A generic command error.

  12. trait CommandResultMaker[Result] extends AnyRef

    Permalink

    Handler for deserializing commands results.

    Handler for deserializing commands results.

    Result

    The result type of this command.

  13. case class CrAuthenticate(user: String, password: String, nonce: String) extends Command[SuccessfulAuthentication] with Product with Serializable

    Permalink

    Mongo CR authenticate Command.

    Mongo CR authenticate Command.

    user

    username

    password

    user's password

    nonce

    the previous nonce given by the server

  14. class DefaultCommandError extends Exception with BSONCommandError

    Permalink

    A default command error, which may contain the original BSONDocument of the response.

  15. case class Descending(field: String) extends SortOrder with Product with Serializable

    Permalink
  16. case class FailedAuthentication(message: String, originalDocument: Option[BSONDocument] = None) extends Exception with BSONCommandError with AuthenticationResult with Product with Serializable

    Permalink

    A failed authentication result

    A failed authentication result

    message

    the explanation of the error.

  17. case class First(field: String) extends GroupFunction with Product with Serializable

    Permalink
  18. case class Group(identifiers: BSONValue)(ops: (String, GroupFunction)*) extends PipelineOperator with Product with Serializable

    Permalink

    Groups documents together to calulate aggregates on document collections.

    Groups documents together to calulate aggregates on document collections. This command aggregates on arbitrary identifiers. Document fields identifier must be prefixed with $. http://docs.mongodb.org/manual/reference/aggregation/group/#_S_group

    identifiers

    Any BSON value acceptable by mongodb as identifier

    ops

    Sequence of operators specifying aggregate calculation.

  19. case class GroupField(idField: String)(ops: (String, GroupFunction)*) extends PipelineOperator with Product with Serializable

    Permalink

    Groups documents together to calulate aggregates on document collections.

    Groups documents together to calulate aggregates on document collections. This command aggregates on one field. http://docs.mongodb.org/manual/reference/aggregation/group/#_S_group

    idField

    Name of the field to aggregate on.

    ops

    Sequence of operators specifying aggregate calculation.

  20. sealed trait GroupFunction extends AnyRef

    Permalink

    Represents one of the group operators for the "Group" Operation.

    Represents one of the group operators for the "Group" Operation. This class is sealed as these are defined in the MongoDB spec, and clients should not need to customise these.

  21. case class GroupMulti(idField: (String, String)*)(ops: (String, GroupFunction)*) extends PipelineOperator with Product with Serializable

    Permalink

    Groups documents together to calulate aggregates on document collections.

    Groups documents together to calulate aggregates on document collections. This command aggregates on multiple fields, and they must be named. http://docs.mongodb.org/manual/reference/aggregation/group/#_S_group

    idField

    Fields to aggregate on, and the names they should be aggregated under.

    ops

    Sequence of operators specifying aggregate calculation.

  22. case class Last(field: String) extends GroupFunction with Product with Serializable

    Permalink
  23. case class Limit(limit: Int) extends PipelineOperator with Product with Serializable

    Permalink

    Limts the number of documents that pass through the stream.

    Limts the number of documents that pass through the stream. http://docs.mongodb.org/manual/reference/aggregation/limit/#_S_limit

    limit

    Number of documents to allow through.

  24. class MakableCommand extends AnyRef

    Permalink

    A makable command, that can produce a request maker ready to be sent to a reactivemongo.core.actors.MongoDBSystem actor.

  25. case class Match(predicate: BSONDocument) extends PipelineOperator with Product with Serializable

    Permalink

    Filters out documents from the stream that do not match the predicate.

    Filters out documents from the stream that do not match the predicate. http://docs.mongodb.org/manual/reference/aggregation/match/#_S_match

    predicate

    Query that documents must satisfy to be in the stream.

  26. case class Max(field: String) extends GroupFunction with Product with Serializable

    Permalink
  27. case class Min(field: String) extends GroupFunction with Product with Serializable

    Permalink
  28. sealed trait Modify extends AnyRef

    Permalink

    A modify operation, part of a FindAndModify command

  29. sealed trait PipelineOperator extends AnyRef

    Permalink

    One of MongoDBs pipeline operators for aggregation.

    One of MongoDBs pipeline operators for aggregation. Sealed as these are defined in the mongodb spec, and clients should not have custom operators.

  30. case class Project(fields: (String, BSONValue)*) extends PipelineOperator with Product with Serializable

    Permalink

    Reshapes a document stream by renaming, adding, or removing fields.

    Reshapes a document stream by renaming, adding, or removing fields. Also use "Project" to create computed values or sub-objects. http://docs.mongodb.org/manual/reference/aggregation/project/#_S_project

    fields

    Fields to include. The resulting objects will contain only these fields

  31. case class Push(field: String) extends GroupFunction with Product with Serializable

    Permalink
  32. case class PushMulti(fields: (String, String)*) extends GroupFunction with Product with Serializable

    Permalink
  33. case class ScramSha1Challenge(conversationId: Int, payload: Array[Byte]) extends Product with Serializable

    Permalink
  34. case class ScramSha1FinalNegociation(conversationId: Int, payload: Array[Byte]) extends Command[SuccessfulAuthentication] with Product with Serializable

    Permalink

    conversationId

    the ID of the SCRAM-SHA1 conversation

  35. case class ScramSha1Initiate(user: String) extends Command[ScramSha1Challenge] with Product with Serializable

    Permalink

    Command to start with Mongo SCRAM-SHA1 authentication.

    Command to start with Mongo SCRAM-SHA1 authentication.

    user

    username

  36. case class ScramSha1Negociation(serverSignature: Array[Byte], request: BSONDocument) extends Product with Serializable

    Permalink

    serverSignature

    the SCRAM-SHA1 signature for the MongoDB server

    request

    the next client request for the SCRAM-SHA1 authentication

  37. case class ScramSha1StartNegociation(user: String, password: String, conversationId: Int, payload: Array[Byte], randomPrefix: String, startMessage: String) extends Command[Either[SuccessfulAuthentication, Array[Byte]]] with Product with Serializable

    Permalink

    Command to continue with Mongo SCRAM-SHA1 authentication.

    Command to continue with Mongo SCRAM-SHA1 authentication.

    user

    the name of the user

    password

    the user password

    payload

    the initial payload

  38. case class Skip(skip: Int) extends PipelineOperator with Product with Serializable

    Permalink

    Skips over a number of documents before passing all further documents along the stream.

    Skips over a number of documents before passing all further documents along the stream. http://docs.mongodb.org/manual/reference/aggregation/skip/#_S_skip

    skip

    Number of documents to skip.

  39. case class Sort(fields: Seq[SortOrder]) extends PipelineOperator with Product with Serializable

    Permalink

    Sorts the stream based on the given fields.

    Sorts the stream based on the given fields. http://docs.mongodb.org/manual/reference/aggregation/sort/#_S_sort

    fields

    Fields to sort by.

  40. sealed trait SortOrder extends AnyRef

    Permalink

    Represents that a field should be sorted on, as well as whether it should be ascending or descending.

  41. sealed trait SuccessfulAuthentication extends AuthenticationResult

    Permalink

    A successful authentication result.

  42. case class SumField(field: String) extends GroupFunction with Product with Serializable

    Permalink
  43. case class SumValue(value: Int) extends GroupFunction with Product with Serializable

    Permalink
  44. case class Unwind(field: String) extends PipelineOperator with Product with Serializable

    Permalink

    Turns a document with an array into multiple documents, one document for each element in the array.

    Turns a document with an array into multiple documents, one document for each element in the array. http://docs.mongodb.org/manual/reference/aggregation/unwind/#_S_unwind

    field

    Name of the array to unwind.

  45. case class VerboseSuccessfulAuthentication(db: String, user: String, readOnly: Boolean) extends SuccessfulAuthentication with Product with Serializable

    Permalink

    A verbose successful authentication result (MongoDB >= 2.2).

    A verbose successful authentication result (MongoDB >= 2.2).

    Previous versions of MongoDB only return ok = BSONDouble(1.0).

    db

    database name

    user

    username

    readOnly

    states if the authentication gives us only the right to read from the database.

  46. case class Aggregate(collectionName: String, pipeline: Seq[PipelineOperator]) extends Command[Stream[BSONDocument]] with Product with Serializable

    Permalink

    Implements the "aggregation" command, otherwise known as the "Aggregation Framework." http://docs.mongodb.org/manual/applications/aggregation/

    Implements the "aggregation" command, otherwise known as the "Aggregation Framework." http://docs.mongodb.org/manual/applications/aggregation/

    collectionName

    Collection to aggregate against

    pipeline

    Sequence of MongoDB aggregation operations.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.4) Use reactivemongo.api.collections.bson.BSONCollection.aggregate

  47. case class Authenticate(user: String, password: String, nonce: String) extends Command[SuccessfulAuthentication] with Product with Serializable

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.10) See CrAuthenticate

  48. class CollStats extends Command[CollStatsResult]

    Permalink

    Returns a document containing various information about a collection.

    Returns a document containing various information about a collection.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.CollStats instead

  49. class ConvertToCapped extends Command[Boolean]

    Permalink

    Converts a regular collection into a capped one.

    Converts a regular collection into a capped one.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.ConvertToCapped instead

  50. case class Count(collectionName: String, query: Option[BSONDocument] = None, fields: Option[BSONDocument] = None) extends Command[Int] with Product with Serializable

    Permalink

    The Count command.

    The Count command.

    Returns a document containing the number of documents matching the query.

    collectionName

    the name of the target collection

    query

    the document selector

    fields

    select only the matching fields

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.Count instead

  51. class CreateCollection extends Command[Boolean]

    Permalink

    Creates a collection on the database.

    Creates a collection on the database.

    Unless you want to give some extra parameters (like capped collections, or autoIndexId), it is not necessary as MongoDB creates regular collections on the fly.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.Create instead

  52. case class DeleteIndex(collection: String, index: String) extends Command[Int] with Product with Serializable

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.DropIndexes instead

  53. class Drop extends Command[Boolean]

    Permalink

    Drop a collection.

    Drop a collection.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.Drop instead

  54. class DropDatabase extends Command[Boolean]

    Permalink

    Drop a database.

    Drop a database.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.DropDatabase instead

  55. class EmptyCapped extends Command[Boolean]

    Permalink

    Empty a capped collection.

    Empty a capped collection.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.EmptyCapped instead

  56. case class FindAndModify(collection: String, query: BSONDocument, modify: Modify, upsert: Boolean = false, sort: Option[BSONDocument] = None, fields: Option[BSONDocument] = None) extends Command[Option[BSONDocument]] with Product with Serializable

    Permalink

    FindAndModify command.

    FindAndModify command.

    This command allows to perform a modify operation (update/remove) matching a query, without the extra requests. It returns the old document by default.

    collection

    the target collection name

    query

    the filter for this command

    modify

    the reactivemongo.core.commands.Modify operation to do

    upsert

    states if a new document should be inserted if no match

    sort

    the sort document

    fields

    retrieve only a subset of the returned document

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.FindAndModifyCommand instead

  57. case class GetLastError(j: Boolean = false, w: Option[BSONValue] = None, wtimeout: Int = 0, fsync: Boolean = false) extends Command[LastError] with Product with Serializable

    Permalink

    GetLastError Command.

    GetLastError Command.

    This command is used to check the status of the immediately previous operation. It is commonly used to make sure that a write request has been effectively done (so it is also known as writeConcern). This command will return only when the previous operation is complete and matches its parameters (for example, with waitForReplicatedOn set to Some(2), this command will return only when at least two replicas have also run the previous operation).

    j

    Make sure that the previous operation has been committed into the journal. Journaling must be enabled on the servers.

    w

    Specify the level of replication for a write operation. Should be a BSONString or BSONInteger. See the MongoDB documentation.

    wtimeout

    Write propagation timeout (in milliseconds). See the MongoDB documentation.

    fsync

    Make sure that the previous (write) operation has been written on the disk.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.GetLastError instead

  58. case class IsMasterResponse(isMaster: Boolean, secondary: Boolean, maxBsonObjectSize: Int, setName: Option[String], hosts: Option[Seq[String]], me: Option[String], tags: Option[BSONDocument]) extends Product with Serializable

    Permalink

    Deserialized IsMaster command response.

    Deserialized IsMaster command response.

    isMaster

    states if the server is a primary

    secondary

    states if the server is a secondary

    maxBsonObjectSize

    the maximum document size allowed by the server

    setName

    the name of the replica set, if any

    hosts

    the names (servername:port) of the other nodes in the replica set, if any

    me

    the name (servername:port) of the answering server

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.IsMasterCommand instead

  59. case class LastError(ok: Boolean, err: Option[String], code: Option[Int], errMsg: Option[String], originalDocument: Option[BSONDocument], updated: Int, updatedExisting: Boolean) extends Exception with DatabaseException with Product with Serializable

    Permalink

    Result of the GetLastError command.

    Result of the GetLastError command.

    ok

    True if the last operation was successful

    err

    The err field, if any

    code

    The error code, if any

    errMsg

    The message (often regarding an error) if any

    originalDocument

    The whole map resulting of the deserialization of the response with the DefaultBSONHandlers.

    updated

    The number of documents affected by last command, 0 if none

    updatedExisting

    When true, the last update operation resulted in change of existing documents

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.WriteResult instead

  60. case class RawCommand(bson: BSONDocument) extends Command[BSONDocument] with Product with Serializable

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using rawCommand on reactivemongo.api.collections.GenericCollection.runner instead

  61. class RenameCollection extends AdminCommand[Boolean]

    Permalink

    Rename a collection.

    Rename a collection.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.RenameCollection instead

  62. case class Update(update: BSONDocument, fetchNewObject: Boolean) extends Modify with Product with Serializable

    Permalink

    Update (part of a FindAndModify command).

    Update (part of a FindAndModify command).

    update

    the modifier document.

    fetchNewObject

    the command result must be the new object instead of the old one.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.FindAndModifyCommand instead

Value Members

  1. object Aggregate extends BSONCommandResultMaker[Stream[BSONDocument]] with Serializable

    Permalink
  2. object CollStatsResult extends BSONCommandResultMaker[CollStatsResult] with Serializable

    Permalink
  3. object CommandError extends Serializable

    Permalink
  4. object CrAuthenticate extends BSONCommandResultMaker[SuccessfulAuthentication] with Serializable

    Permalink

    Authentication command's response deserializer.

  5. object GetCrNonce extends Command[String]

    Permalink

    Getnonce Command for Mongo CR authentication.

    Getnonce Command for Mongo CR authentication.

    Gets a nonce for authentication token.

  6. object GroupFunction

    Permalink

    Factory to declare custom call to a group function.

  7. object ScramSha1FinalNegociation extends BSONCommandResultMaker[SuccessfulAuthentication] with Serializable

    Permalink
  8. object ScramSha1Initiate extends BSONCommandResultMaker[ScramSha1Challenge] with Serializable

    Permalink
  9. object ScramSha1Negociation extends Serializable

    Permalink
  10. object ScramSha1StartNegociation extends BSONCommandResultMaker[Either[SuccessfulAuthentication, Array[Byte]]] with Serializable

    Permalink
  11. object SilentSuccessfulAuthentication extends SuccessfulAuthentication

    Permalink

    A silent successful authentication result (MongoDB <= 2.0).

Deprecated Value Members

  1. object Count extends BSONCommandResultMaker[Int] with Serializable

    Permalink

    Deserializer for the Count command.

    Deserializer for the Count command. Basically returns an Int (number of counted documents)

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.Count instead

  2. object FindAndModify extends BSONCommandResultMaker[Option[BSONDocument]] with Serializable

    Permalink

    FindAndModify command deserializer

    FindAndModify command deserializer

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.FindAndModifyCommand instead

  3. object Getnonce extends Command[String]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.10) See GetCrNonce

  4. object IsMaster extends AdminCommand[IsMasterResponse]

    Permalink

    IsMaster Command.

    IsMaster Command.

    States if the target server is a primary. This command also gives some useful information, like the other nodes in the replica set.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.IsMasterCommand instead

  5. object LastError extends BSONCommandResultMaker[LastError] with Serializable

    Permalink

    Deserializer for GetLastError command result.

    Deserializer for GetLastError command result.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.LastError instead

  6. object Remove extends Modify

    Permalink

    Remove (part of a FindAndModify command).

    Remove (part of a FindAndModify command).

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.0) consider using reactivemongo.api.commands.FindAndModifyCommand instead

  7. object ReplStatus extends AdminCommand[Map[String, BSONValue]]

    Permalink

    ReplSetGetStatus Command.

    ReplSetGetStatus Command.

    Returns the state of the Replica Set from the target server's point of view.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.5) consider using reactivemongo.api.commands.ReplSetGetStatus

  8. object Status extends AdminCommand[Map[String, BSONValue]]

    Permalink

    ServerStatus Command.

    ServerStatus Command.

    Gets the detailed status of the target server.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.11.5) consider using reactivemongo.api.commands.ServerStatus

Inherited from AnyRef

Inherited from Any

Ungrouped