mongodb\Command createCollection()

createCollection() public method Creates new collection in database associated with this command.s public boolean createCollection ( $collectionName, array $options = [] )$collectionName string Collection name $options array Collection options in format: "name" => "value" return boolean Whether operation was successful.

mongodb\Command createIndexes()

createIndexes() public method Creates indexes in the collection. public boolean createIndexes ( $collectionName, $indexes )$collectionName string Collection name. $indexes array[] Indexes specification. Each specification should be an array in format: optionName => value The main options are: keys: array, column names with sort order, to be indexed. This option is mandatory. unique: boolean, whether to create unique index. name: string, the name of the index, if not set it will be

mongodb\Command batchInsert()

batchInsert() public method Inserts batch of new documents into collection. public array|false batchInsert ( $collectionName, $documents, $options = [] )$collectionName string Collection name $documents array[] Documents list $options array List of options in format: optionName => optionValue. return array|false List of inserted IDs, false on failure.

mongodb\Command aggregate()

aggregate() public method Performs aggregation using MongoDB Aggregation Framework. public array aggregate ( $collectionName, $pipelines, $options = [] )$collectionName string Collection name $pipelines array List of pipeline operators. $options array Optional parameters. return array Aggregation result.

mongodb\Command addUpdate()

addUpdate() public method Adds the update operation to the batch command. See also executeBatch(). public $this addUpdate ( $condition, $document, $options = [] )$condition array Filter condition $document array Data to be updated $options array Update options. return $this Self reference.

mongodb\Command addDelete()

addDelete() public method Adds the delete operation to the batch command. See also executeBatch(). public $this addDelete ( $condition, $options = [] )$condition array Filter condition. $options array Delete options. return $this Self reference.

mongodb\Command addInsert()

addInsert() public method Adds the insert operation to the batch command. See also executeBatch(). public $this addInsert ( $document )$document array Document to be inserted return $this Self reference.

mongodb\Command $writeConcern

$writeConcern public property Write concern to be used in this command. public \MongoDB\Driver\WriteConcern|null getWriteConcern ( )public $this setWriteConcern ( $writeConcern )

mongodb\Command $document

$document public property Command document contents. public array $document = []

mongodb\Command $readConcern

$readConcern public property Read concern to be used in this command. public \MongoDB\Driver\ReadConcern|string getReadConcern ( )public $this setReadConcern ( $readConcern )