©
Ce document utilise Manuel du site Web PHP chinois Libérer
(PECL mongo >=0.9.0)
Represents a MongoDB collection.
Collection names can use any character in the ASCII set. Some valid collection names are "", "...", "my collection", and "*&#@".
User-defined collection names cannot contain the $ symbol. There are certain system collections which use a $ in their names (e.g., local.oplog.$main), but it is a reserved character. If you attempt to create and use a collection with a $ in the name, MongoDB will assert.
NULL
;$pipeline
[, array $options
] )$command
[, array $options
] )$a
[, array $options
= array()
] )$db
, string $name
)$query
= array()
[, int $limit
= 0
[, int $skip
= 0
]]] )$document_or_id
)$keys
[, array $options
= array()
] )$keys
)$key
[, array $query
] )$key|keys
[, array $options
= array()
] )$query
= array()
[, array $fields
= array()
]] )$query
[, array $update
[, array $fields
[, array $options
]]] )$query
= array()
[, array $fields
= array()
[, array $options
= array()
]]] )$name
)$ref
)$keys
, array $initial
, MongoCode $reduce
[, array $options
= array()
] )$a
[, array $options
= array()
] )$num_cursors
)$criteria
= array()
[, array $options
= array()
]] )$a
[, array $options
= array()
] )$read_preference
[, array $tags
] )$ok
= true
] )$w
[, int $wtimeout
] )$keys
)$criteria
, array $new_object
[, array $options
= array()
] )$scan_data
= FALSE
] )MongoCollection::ASCENDING
1
MongoCollection::DESCENDING
-1
The "parent" database for this collection.
The number of servers to replicate a change to before returning success. Value is inherited from the parent database. The MongoDB class has a more detailed description of how w works.
The number of milliseconds to wait for $this->w replications to take place. Value is inherited from the parent database. The MongoDB class has a more detailed description of how wtimeout works.
MongoDB core docs on » collections.