MQL reference navigation
MongoDB Query Language (MQL) Commands
MongoDB Query Language (MQL) commands are direct instructions for managing and interacting with your database server. They are essential for performing administrative tasks, optimizing performance, and maintaining security.
See wire-command support and common fields for a source-correlated inventory, shared request metadata, compatibility responses, and provider-dependent command availability.
See contrib extensions for optional additions to the command surface.
collMod
Modify collection, view, schema-validation, and index settings in DocumentDB.
create
Create a DocumentDB collection or view and configure its supported options.
drop and dropDatabase
Remove collections or logical databases using DocumentDB wire commands.
listCollections
List collection and view metadata in DocumentDB with filtering and cursor options.
listDatabases
List logical DocumentDB databases and filter the returned metadata.
renameCollection
Rename a DocumentDB collection within the same logical database.
Aggregate
The aggregate command is used to process data records and return computed results.
Count
Count command is used to count the number of documents in a collection that match a specified query.
Distinct
The distinct command is used to find the unique values for a specified field across a single collection.
Distributed collMod colocation
Colocate DocumentDB collections using the collMod extension provided by documentdb_distributed.
listShards
List DocumentDB distributed node groups and their active members with documentdb_distributed.
moveCollection
Move an unsharded DocumentDB collection to another node group with documentdb_distributed.
documentdb_distributed
Extend DocumentDB with distribution, colocation, and rebalancing.
Distributed rebalancer
Start, inspect, and stop DocumentDB distributed shard rebalancing through wire protocol commands.
Distributed shard discovery
Describe getShardMap and listShards responses implemented by documentdb_distributed.
Distributed sharding and placement
Shard, reshard, unshard, and move DocumentDB collections with documentdb_distributed.
collStats
Return collection statistics in DocumentDB with a configurable size scale.
compact
Run collection maintenance, update statistics, or estimate reclaimable storage in DocumentDB.
Compatibility commands
Describe the simple responses of DocumentDB compatibility wire commands.
currentOp
Inspect active operations in DocumentDB using supported currentOp fields and filters.
dbStats
Return statistics for the current logical DocumentDB database.
explain
Explain supported DocumentDB read commands and select diagnostic verbosity.
hello
The hello command returns information about the DocumentDB server, including topology role, wire protocol limits, and the DocumentDB engine version.
killOp
Cancel a DocumentDB operation using the string identifier reported by currentOp.
validate
Validate DocumentDB collection metadata and indexes with supported validation modes.
Wire-command support and common fields
Source-correlated inventory of DocumentDB wire commands, shared options, compatibility responses, and provider-dependent commands.
delete
The delete command in DocumentDB deletes documents that match a specified criteria
find
The find command in DocumentDB returns documents that match a specified filter criteria
findAndModify
The findAndModify command is used to atomically modify and return a single document.
getMore
The getMore command is used to retrieve extra batches of documents from an existing cursor.
insert
The insert command in DocumentDB creates new documents in a collection
killCursors
Close DocumentDB cursors by their BSON 64-bit identifiers.
update
The update commands in DocumentDB modify documents within a collection that match specific filters