Commands
Command | Description |
---|---|
| Returns all documents in the collection |
| Returns all documents where the field matches the specified value |
| Returns all documents where both the fields match their respective values |
| Returns all documents where either field matches its respective value |
| Returns all documents sorted by the specified field in ascending order |
| Returns all documents sorted by the specified field in descending order |
| Returns only the first |
| Skips the first |
| Inserts a new document into the collection |
| Inserts multiple documents into the collection |
| Updates the first document that matches the query with the new field value |
| Updates all documents that match the query with the new field value |
| Deletes the first document that matches the query |
| Deletes all documents that match the query |
| Performs a multi-stage aggregation operation on the collection |
Note: Replace <field>
, <value>
, <new_value>
, <num>
, <stage>
, and collection
with the actual field, value, new value, number, stage, and collection names, respectively.
Last updated