mongodb\Migration batchInsert()

batchInsert() public method

Inserts several new rows into collection.

public array batchInsert ( $collection, $rows, $options = [] )
$collection array|string

Collection name.

$rows array

Array of arrays or objects to be inserted.

$options array

List of options in format: optionName => optionValue.

return array

Inserted data, each row will have "_id" key assigned to it.

doc_Yii
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.