mongodb\Command executeBatch()

executeBatch() public method

Execute commands batch (bulk).

public array executeBatch ( $collectionName, $options = [] )
$collectionName string

Collection name.

$options array

Batch options.

return array

Array of 2 elements:

  • 'insertedIds' - contains inserted IDs.
  • 'result' - \MongoDB\Driver\WriteResult instance.
throws yii\mongodb\Exception

on failure.

throws yii\base\InvalidConfigException

on invalid $document format.

doc_Yii
2016-10-30 17:07:48
Comments
Leave a Comment

Please login to continue.