Method |
Description |
|
__construct ( $uri, array $uriOptions = [], array $driverOptions = [], $collectionPrefix = '' ) |
|
|
aggregate ( $collectionName, array $pipeline, array $options = [] ) |
|
|
bulkWrite ( $collectionName, array $operations, array $options = [] ) |
|
|
command ( $command, array $options = [] ) |
|
|
count ( $collectionName, $filter = [], array $options = [] ) |
|
|
createCollection ( string $name, array $options = [] ) : array | object |
Create collection |
|
createIndex ( $collectionName, Webiny\Component\Mongo\Index\IndexInterface $index, array $options = [] ) |
|
|
createIndexes ( $collectionName, array $indexes ) |
|
|
delete ( $collectionName, $filter, array $options = [] ) |
|
|
distinct ( $collectionName, $fieldName, $filter = [], array $options = [] ) |
|
|
dropCollection ( string $collectionName, array $options = [] ) : array | object |
Drop collection |
|
dropIndex ( $collectionName, $indexName, array $options = [] ) |
|
|
dropIndexes ( $collectionName, array $options = [] ) |
|
|
find ( $collectionName, $filter = [], $sort = [], $limit, $skip, array $options = [] ) |
|
|
findOne ( $collectionName, $filter = [], array $options = [] ) |
|
|
findOneAndDelete ( $collectionName, $filter, array $options = [] ) |
|
|
findOneAndReplace ( $collectionName, $filter, $replacement, array $options = [] ) |
|
|
findOneAndUpdate ( $collectionName, $filter, $update, array $options = [] ) |
|
|
getCollectionPrefix ( ) : string |
Get collection prefix |
|
getNamespace ( $collectionName ) |
|
|
id ( null | string $id = null ) : MongoDB\BSON\ObjectID |
Construct Mongo ID |
|
insertMany ( $collectionName, array $documents, array $options = [] ) |
|
|
insertOne ( $collectionName, $document, array $options = [] ) |
|
|
isId ( $id ) : boolean |
Check if given string is a valid MongoId string |
|
listCollections ( array $options = [] ) : mixed |
List collections |
|
listIndexes ( string $collectionName, array $options = [] ) : array |
|
|
selectDatabase ( string $database ) |
Select database |
|
update ( $collectionName, $filter, $update, array $options = [] ) |
|
|