net.fehmicansaglam.tepkin.protocol

command

package command

Visibility
  1. Public
  2. All

Type Members

  1. trait AdminCommand extends Command

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

  2. case class Aggregate(databaseName: String, collectionName: String, pipeline: List[BsonDocument], explain: Option[Boolean], allowDiskUse: Option[Boolean], cursor: Option[BsonDocument]) extends Command with Product with Serializable

    Performs aggregation operation using the aggregation pipeline.

    Performs aggregation operation using the aggregation pipeline. The pipeline allows users to process data from a collection with a sequence of stage-based manipulations.

    pipeline

    An array of aggregation pipeline stages that process and transform the document stream as part of the aggregation pipeline.

    explain

    Optional. Specifies to return the information on the processing of the pipeline.

    allowDiskUse

    Optional. Enables writing to temporary files. When set to true, aggregation stages can write data to the _tmp subdirectory in the dbPath directory.

    cursor

    Optional. Specify a document that contains options that control the creation of the cursor object.

  3. case class Authenticate(databaseName: String, username: String, password: String, nonce: String) extends Command with Product with Serializable

  4. trait Command extends Message

    A MongoDB Command.

    A MongoDB Command.

    Basically, it is a query that is performed on any db.$cmd collection.

  5. case class Count(databaseName: String, collectionName: String, query: Option[BsonDocument] = None, limit: Option[Int] = None, skip: Option[Int] = None, hint: Option[BsonValue] = None) extends Command with Product with Serializable

    Counts the number of documents in a collection.

    Counts the number of documents in a collection.

    collectionName

    The name of the collection to count.

    query

    Optional. A query that selects which documents to count in a collection.

    limit

    Optional. The maximum number of matching documents to return.

    skip

    Optional. The number of matching documents to skip before returning results.

    hint

    Optional. The index to use. Specify either the index name as a string or the index specification document.

  6. case class CreateIndexes(databaseName: String, collectionName: String, indexes: Index*) extends Command with Product with Serializable

    Builds one or more indexes on a collection.

    Builds one or more indexes on a collection.

    indexes

    Specifies the indexes to create. Each document in the array specifies a separate index.

  7. case class Delete(databaseName: String, collectionName: String, deletes: Seq[DeleteElement], ordered: Option[Boolean] = None, writeConcern: Option[BsonDocument] = None) extends Command with Product with Serializable

    The delete command removes documents from a collection.

    The delete command removes documents from a collection. A single delete command can contain multiple delete specifications. The command cannot operate on capped collections.

    collectionName

    The name of the target collection.

    deletes

    An array of one or more delete statements to perform in the named collection.

    ordered

    Optional. If true, then when a delete statement fails, return without performing the remaining delete statements. If false, then when a delete statement fails, continue with the remaining delete statements, if any. Defaults to true.

    writeConcern

    Optional. A document expressing the write concern of the delete command. Omit to use the default write concern.

  8. case class DeleteElement(q: BsonDocument, limit: Int) extends Product with Serializable

    Delete statement.

    Delete statement.

    q

    The query that matches documents to delete.

    limit

    The number of matching documents to delete. Specify either a 0 to delete all matching documents or 1 to delete a single document.

  9. case class Distinct(databaseName: String, collectionName: String, key: String, query: Option[BsonDocument] = None) extends Command with Product with Serializable

    Finds the distinct values for a specified field across a single collection.

    Finds the distinct values for a specified field across a single collection.

    collectionName

    The name of the collection to query for distinct values.

    key

    The field for which to return distinct values.

    query

    Optional. A query that specifies the documents from which to retrieve the distinct values.

  10. case class Drop(databaseName: String, collectionName: String) extends Command with Product with Serializable

    Removes an entire collection from a database.

    Removes an entire collection from a database. This command also removes any indexes associated with the dropped collection.

  11. case class FindAndModify(databaseName: String, collectionName: String, query: Option[BsonDocument] = None, sort: Option[BsonDocument] = None, removeOrUpdate: Either[Boolean, BsonDocument], returnNew: Boolean = false, fields: Option[Seq[String]] = None, upsert: Boolean = false) extends Command with Product with Serializable

    The findAndModify command modifies and returns a single document.

    The findAndModify command modifies and returns a single document. By default, the returned document does not include the modifications made on the update. To return the document with the modifications made on the update, use the new option.

    collectionName

    The collection against which to run the command.

    query

    Optional. The selection criteria for the modification. Although the query may match multiple documents, findAndModify will only select one document to modify.

    sort

    Optional. Determines which document the operation modifies if the query selects multiple documents. findAndModify modifies the first document in the sort order specified by this argument.

    removeOrUpdate

    Must specify either the remove or the update field. Remove removes the document specified in the query field. Set this to true to remove the selected document. The default is false. Update performs an update of the selected document. The update field employs the same update operators or field: value specifications to modify the selected document.

    returnNew

    Optional. When true, returns the modified document rather than the original. The findAndModify method ignores the new option for remove operations. The default is false.

    fields

    Optional. A subset of fields to return. The fields document specifies an inclusion of a field with 1.

    upsert

    Optional. Used in conjunction with the update field. When true, findAndModify creates a new document if no document matches the query, or if documents match the query, findAndModify performs an update. To avoid multiple upserts, ensure that the query fields are uniquely indexed. The default is false.

  12. case class GetLastError(databaseName: String, j: Option[Boolean] = None, w: Option[BsonValue] = None, fsync: Option[Boolean] = None, wtimeout: Option[Int] = None) extends Command with Product with Serializable

  13. case class GetNonce(databaseName: String) extends Command with Product with Serializable

    Use getnonce to generate a one-time password for authentication.

  14. case class Index(key: BsonDocument, name: String, background: Option[Boolean] = None, unique: Option[Boolean] = None, sparse: Option[Boolean] = None, expireAfterSeconds: Option[Int] = None, storageEngine: Option[BsonDocument] = None, weights: Option[BsonDocument] = None, defaultLanguage: Option[String] = None, languageOverride: Option[String] = None, textIndexVersion: Option[Int] = None, _2dSphereIndexVersion: Option[Int] = None, bits: Option[Int] = None, min: Option[Double] = None, max: Option[Double] = None, bucketSize: Option[Int] = None, ns: Option[String] = None) extends Product with Serializable

    key

    Specifies the index’s fields. For each field, specify a key-value pair in which the key is the name of the field to index and the value is either the index direction or index type. If specifying direction, specify 1 for ascending or -1 for descending.

    name

    A name that uniquely identifies the index.

    background

    Builds the index in the background so that building an index does not block other database activities. Specify true to build in the background. The default value is false.

    unique

    Creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. Specify true to create a unique index. The default value is false.

    sparse

    If true, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). The default value is false.

    expireAfterSeconds

    Specifies a value, in seconds, as a TTL to control how long MongoDB retains documents in this collection.

    storageEngine

    Allows users to specify configuration to the storage engine on a per-index basis when creating an index.

    weights

    For text indexes, a document that contains field and weight pairs. The weight is an integer ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields in terms of the score. You can specify weights for some or all the indexed fields. The default value is 1.

    defaultLanguage

    For text indexes, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is english.

    languageOverride

    For text indexes, the name of the field, in the collection’s documents, that contains the override language for the document. The default value is language.

    textIndexVersion

    For text indexes, the text index version number. Version can be either 1 or 2.

    _2dSphereIndexVersion

    For 2dsphere indexes, the 2dsphere index version number. Version can be either 1 or 2.

    bits

    For 2d indexes, the number of precision of the stored geohash value of the location data.

    min

    For 2d indexes, the lower inclusive boundary for the longitude and latitude values. The default value is -180.0.

    max

    For 2d indexes, the upper inclusive boundary for the longitude and latitude values. The default value is 180.0.

    bucketSize

    For geoHaystack indexes, specify the number of units within which to group the location values; i.e. group in the same bucket those location values that are within the specified number of units to each other. The value must be greater than 0.

    ns

    The namespace (i.e. <database>.<collection>) of the collection for which to create the index. If you omit ns, MongoDB generates the namespace.

  15. case class Insert(databaseName: String, collectionName: String, documents: Seq[BsonDocument], ordered: Option[Boolean] = None, writeConcern: Option[BsonDocument] = None) extends Command with Product with Serializable

    The insert command inserts one or more documents and returns a document containing the status of all inserts.

    The insert command inserts one or more documents and returns a document containing the status of all inserts.

    collectionName

    The name of the target collection.

    documents

    An array of one or more documents to insert into the named collection.

    ordered

    Optional. If true, then when an insert of a document fails, return without inserting any remaining documents listed in the inserts array. If false, then when an insert of a document fails, continue to insert the remaining documents. Defaults to true.

    writeConcern

    Optional. A document that expresses the write concern of the insert command. Omit to use the default write concern.

  16. case class ListCollections(databaseName: String, filter: Option[BsonDocument] = None) extends Command with Product with Serializable

    Retrieve information, i.e.

    Retrieve information, i.e. the name and options, about the collections in a database.

    filter

    Optional. A query expression to filter the list of collections.

    Since

    MongoDB 3.0.0

  17. case class ListIndexes(databaseName: String, collectionName: String) extends Command with Product with Serializable

  18. case class Logout(databaseName: String) extends Command with Product with Serializable

    Terminates the current authenticated session

  19. case class Update(databaseName: String, collectionName: String, updates: Seq[UpdateElement], ordered: Option[Boolean] = None, writeConcern: Option[BsonDocument] = None) extends Command with Product with Serializable

    The update command modifies documents in a collection.

    The update command modifies documents in a collection. A single update command can contain multiple update statements.

    collectionName

    The name of the target collection.

    updates

    An array of one or more update statements to perform in the named collection.

    ordered

    Optional. If true, then when an update statement fails, return without performing the remaining update statements. If false, then when an update fails, continue with the remaining update statements, if any. Defaults to true.

    writeConcern

    Optional. A document expressing the write concern of the update command. Omit to use the default write concern.

  20. case class UpdateElement(q: BsonDocument, u: BsonDocument, upsert: Option[Boolean] = None, multi: Option[Boolean] = None) extends Product with Serializable

    Update statement.

    Update statement.

    q

    The query that matches documents to update.

    u

    The modifications to apply.

    upsert

    Optional. If true, perform an insert if no documents match the query. If both upsert and multi are true and no documents match the query, the update operation inserts only a single document.

    multi

    Optional. If true, updates all documents that meet the query criteria. If false, limit the update to one document that meet the query criteria. Defaults to false.

  21. case class Validate(databaseName: String, collectionName: String, full: Option[Boolean] = None, scandata: Option[Boolean] = None) extends Command with Product with Serializable

Value Members

  1. object Index extends Serializable

  2. object IsMaster extends AdminCommand with Product with Serializable

Ungrouped