mongodb\Command count()

count() public method Counts records in specified collection. public integer count ( $collectionName, $condition = [], $options = [] )$collectionName string Collection name $condition array Filter condition $options array List of options in format: optionName => optionValue. return integer Records count

mongodb\Command beginProfile()

beginProfile() protected method Marks the beginning of a code block for profiling. See also endProfile(). protected void beginProfile ( $token, $category )$token string Token for the code block $category string The category of this log message

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 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 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 $writeConcern

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

mongodb\Command $readPreference

$readPreference public property Read preference. public \MongoDB\Driver\ReadPreference getReadPreference ( )public $this setReadPreference ( $readPreference )

mongodb\Command $readConcern

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