Insert a document
Parameters: |
|
---|
remove a document
Parameters: |
---|
Update a document(s) in this collection.
Parameters: |
|
---|
Get a single document from the database.
All arguments to find() are also valid arguments for find_one(), although any limit argument will be ignored. Returns a single document, or None if no matching document is found.
Parameters: |
|
---|
Query the database.
The spec argument is a prototype document that all results must match. For example:
Parameters: |
|
---|
Get the size of the results among all documents.
Returns the number of documents in the results set
Get a list of distinct values for key among all documents in this collection.
Raises TypeError if key is not an instance of basestring (str in python 3).
To get the distinct values for a key in the result set of a query use distinct().
Parameters: |
|
---|
Perform an aggregation using the aggregation framework on this collection.
Parameters: |
|
---|
Note
Requires server version >= 2.1.0
Perform a query similar to an SQL group by operation.
Returns an array of grouped items.
The key parameter can be:
- None to use the entire document as a key.
- A list of keys (each a basestring (str in python 3)) to group by.
- A basestring (str in python 3), or Code instance containing a JavaScript function to be applied to each document, returning the key to group by.
Parameters: |
|
---|