| |
read source history
createView()
MongoDB Driver Function Reference
Creates a view.
More information can be found in the corresponding entry of the MongoDB Manual.
db.createView(<name>, <source>, <pipeline>[, <options>])
|
Arguments
<name> | | View name. |
<source> | | Source collection. |
<pipeline> | | An array of BSON documents specifying the aggregation pipline for the view. |
<options> | | A BOSN document specifying options. |
|
Options
{ capped: collation: <document> }
collation | | A document specifying the collation. |
|
Example
db.createView("bosses", "employees", [{ $match: {salary: { $gt: 1000000 }}}]);
|
Creates a view on the employees collection containing .
home | MongoDB Driver Function Reference | MongoDB Driver
|