PHP Class Phalcon\Db\Adapter\MongoDB\Operation\InsertMany

See also: MongoDB\Collection::insertMany()
See also: http://docs.mongodb.org/manual/reference/command/insert/
Inheritance: implements Phalcon\Db\Adapter\MongoDB\Operation\Executable
ファイルを表示 Open project: phalcon/incubator Class Usage Examples

Public Methods

Method Description
__construct ( string $databaseName, string $collectionName, array $documents, array $options = [] ) Constructs an insert command.
execute ( MongoDB\Driver\Server $server ) : InsertManyResult Execute the operation.

Method Details

__construct() public method

Supported options: * bypassDocumentValidation (boolean): If true, allows the write to opt out of document level validation. * ordered (boolean): If true, when an insert fails, return without performing the remaining writes. If false, when a write fails, continue with the remaining writes, if any. The default is true. * writeConcern (MongoDB\Driver\WriteConcern): Write concern.
public __construct ( string $databaseName, string $collectionName, array $documents, array $options = [] )
$databaseName string Database name
$collectionName string Collection name
$documents array List of documents to insert
$options array Command options

execute() public method

Execute the operation.
See also: Executable::execute()
public execute ( MongoDB\Driver\Server $server ) : InsertManyResult
$server MongoDB\Driver\Server
return Phalcon\Db\Adapter\MongoDB\InsertManyResult