reactivemongo.core

commands

package commands

Visibility
  1. Public
  2. All

Type Members

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

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

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

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

    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.

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

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

    Authenticate Command.

    Authenticate Command.

    user

    username

    password

    user's password

    nonce

    the previous nonce given by the server

  6. sealed trait AuthenticationResult extends AnyRef

    an authentication result

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

  8. trait BSONCommandError extends Exception with CommandError

    A command error that optionally holds the original TraversableBSONDocument

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

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

  11. class CollStats extends Command[CollStatsResult]

    Returns a document containing various information about a collection.

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

    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.

  13. trait Command[Result] extends AnyRef

    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.

  14. trait CommandError extends Exception with ReactiveMongoException

    A generic command error.

  15. trait CommandResultMaker[Result] extends AnyRef

    Handler for deserializing commands results.

    Handler for deserializing commands results.

    Result

    The result type of this command.

  16. class ConvertToCapped extends Command[Boolean]

    Converts a regular collection into a capped one.

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

    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

  18. class CreateCollection extends Command[Boolean]

    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.

  19. class DefaultCommandError extends Exception with BSONCommandError

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

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

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

  22. class Drop extends Command[Boolean]

    Drop a collection.

  23. class DropDatabase extends Command[Boolean]

    Drop a database.

  24. class EmptyCapped extends Command[Boolean]

    Empty a capped collection.

  25. case class EvalCommand(javascript: String, nolock: Boolean) extends Command[Option[BSONValue]] with Product with Serializable

    eval command

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

    A failed authentication result

    A failed authentication result

    message

    the explanation of the error.

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

    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

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

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

    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.

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

    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.

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

    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.

  32. sealed trait GroupFunction extends AnyRef

    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.

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

    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.

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

    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

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

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

    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

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

    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.

  38. class MakableCommand extends AnyRef

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

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

    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.

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

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

  42. sealed trait Modify extends AnyRef

    A modify operation, part of a FindAndModify command

  43. sealed trait PipelineOperator extends AnyRef

    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.

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

    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

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

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

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

  48. class RenameCollection extends AdminCommand[Boolean]

    Rename a collection.

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

    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.

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

    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.

  51. sealed trait SortOrder extends AnyRef

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

  52. sealed trait SuccessfulAuthentication extends AuthenticationResult

    A successful authentication result.

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

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

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

    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.

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

    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.

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

    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.

Value Members

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

  2. object Authenticate extends BSONCommandResultMaker[SuccessfulAuthentication] with Serializable

    Authentication command's response deserializer.

  3. object CollStatsResult extends BSONCommandResultMaker[CollStatsResult] with Serializable

  4. object CommandError extends Serializable

  5. object Count extends BSONCommandResultMaker[Int] with Serializable

    Deserializer for the Count command.

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

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

    FindAndModify command deserializer

  7. object Getnonce extends Command[String]

    Getnonce Command.

    Getnonce Command.

    Gets a nonce for authentication token.

  8. object IsMaster extends AdminCommand[IsMasterResponse]

    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.

  9. object LastError extends BSONCommandResultMaker[LastError] with Serializable

    Deserializer for GetLastError command result.

  10. object Remove extends Modify

    Remove (part of a FindAndModify command).

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

    ReplSetGetStatus Command.

    ReplSetGetStatus Command.

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

  12. object SilentSuccessfulAuthentication extends SuccessfulAuthentication

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

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

    ServerStatus Command.

    ServerStatus Command.

    Gets the detailed status of the target server.

Ungrouped