| |
show wiki show source compare to current compare to previous read history
createView()
MongoDB Driver Function Reference
Creates a view.
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
|