« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 57 for BulkWrite (0.001 sec.)
MongoDB\Driver\BulkWrite::count — Count number of write operations in the bulk ... 12996
MongoDB\Driver\BulkWrite::count (mongodb >=1.0.0) MongoDB\Driver\BulkWrite::count — Count number of write operations in the bulk 説明 public function MongoDB\Driver\BulkWrite::count (): int Returns the number of write operations added to th ... e MongoDB\Driver\BulkWrite object. パラメータ この関数にはパラメータはありません。 戻り値 Returns number of write operations added to the MongoDB\Dri ... ver\BulkWrite object. エラー / 例外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 変更履歴 バージ ... ョン 説明 PECL mongodb 1.2.0 Returns the number of write operations added to the MongoDB\Driver\BulkWrite object. Earlier versions returned the expected number of client-to-server roundtrips required to execute all write operati ...
https://man.mtool.work/php/8.3/mongodb-driver-bulkwrite.count.html
The MongoDB\Driver\BulkWrite class | PHP 8.3 12071
The MongoDB\Driver\BulkWrite class (mongodb >=1.0.0) はじめに The MongoDB\Driver\BulkWrite collects one or more write operations that should be sent to the server. After adding any number of insert, update, and delete operations, the collec ... tion may be executed via MongoDB\Driver\Manager::executeBulkWrite() . Write operations may either be ordered (default) or unordered. Ordered write operations are sent to the server, in the ... rallel. Any errors that occur are reported after all operations have been attempted. クラス概要 final class MongoDB\Driver\BulkWrite implements Countable { /* メソッド */ public function __construct ( ? array $options = null ) public function count (): in ... letes) will be assembled into typed write commands to be sent sequentially to the server. <?php $bulk = new MongoDB\Driver\BulkWrite ([ 'ordered' => true ]); $bulk -> insert ([ '_id' => 1 , 'x' => 1 ]); $bulk -> insert ([ '_id' => 2 , 'x' => 2 ]); $bulk - ...
https://man.mtool.work/php/8.3/class.mongodb-driver-bulkwrite.html
MongoDB\Driver\BulkWrite::insert — Add an insert operation to the bulk | PHP 8.... 10470
MongoDB\Driver\BulkWrite::insert (mongodb >=1.0.0) MongoDB\Driver\BulkWrite::insert — Add an insert operation to the bulk 説明 public function MongoDB\Driver\BulkWrite::insert ( array | object $document ): mixed Adds an insert operation to ... the MongoDB\Driver\BulkWrite . パラメータ document ( array | object ) A document to insert. 戻り値 Returns the _id of the inserted document. If the doc ... ays returned. Previously, the method only returned a value if a MongoDB\BSON\ObjectId was generated. 例 例1 MongoDB\Driver\BulkWrite::insert() example <?php $bulk = new MongoDB\Driver\BulkWrite ; $doc1 = [ 'x' => 1 ]; $doc2 = [ '_id' => 'custom-id' , 'x' ... $id1 , $id2 , $id3 ); $manager = new MongoDB\Driver\Manager ( 'mongodb://localhost:27017' ); $result = $manager -> executeBulkWrite ( 'db.collection' , $bulk ); ?> 上の例の出力は、 たとえば以下のようになります。 object(MongoDB\BSON\ObjectId)#3 (1) { ["oi ...
https://man.mtool.work/php/8.3/mongodb-driver-bulkwrite.insert.html
The MongoDB\Driver\Cursor class | PHP 8.3 10015
The MongoDB\Driver\Cursor class (mongodb >=1.0.0) はじめに The MongoDB\Driver\Cursor class encapsulates the results of a MongoDB command or query and may be returned by MongoDB\Driver\Manager::executeCommand() or MongoDB\Driver\Manager::exe ... reach . <?php $manager = new MongoDB\Driver\Manager (); /* Insert some documents so that our query returns information */ $bulkWrite = new MongoDB\Driver\BulkWrite ; $bulkWrite -> insert ([ 'name' => 'Ceres' , 'size' => 946 , 'distance' => 2.766 ]); $bulk ... Write -> insert ([ 'name' => 'Vesta' , 'size' => 525 , 'distance' => 2.362 ]); $manager -> executeBulkWrite ( "test.asteroids" , $bulkWrite ); /* Query for all the items in the collection */ $query = new MongoDB\Driver\Query ( [] ... t' , new MongoDB\Driver\Command ([ 'create' => 'asteroids' , 'capped' => true , 'size' => 1048576 , ])); while ( true ) { $bulkWrite = new MongoDB\Driver\BulkWrite ; $bulkWrite -> insert ([ 'createdAt' => new MongoDB\BSON\UTCDateTime ]); $manager -> execu ...
https://man.mtool.work/php/8.3/class.mongodb-driver-cursor.html
MongoDB\Driver\BulkWrite::delete — Add a delete operation to the bulk | PHP 8.3 10015
MongoDB\Driver\BulkWrite::delete (mongodb >=1.0.0) MongoDB\Driver\BulkWrite::delete — Add a delete operation to the bulk 説明 public function MongoDB\Driver\BulkWrite::delete ( array | object $filter , ? array $deleteOptions = null ): void ... Adds a delete operation to the MongoDB\Driver\BulkWrite . パラメータ filter ( array | object ) The » query predicate . An empty predicate will match all documents in the collecti ... ョン 説明 PECL mongodb 1.8.0 Added the "hint" option. PECL mongodb 1.2.0 Added the "collation" option. 例 例1 MongoDB\Driver\BulkWrite::delete() example <?php $bulk = new MongoDB\Driver\BulkWrite ; $bulk -> delete ([ 'x' => 1 ], [ 'limit' => 1 ]); $bulk -> ... ], [ 'limit' => 0 ]); $manager = new MongoDB\Driver\Manager ( 'mongodb://localhost:27017' ); $result = $manager -> executeBulkWrite ( 'db.collection' , $bulk ); ?> 参考 MongoDB\Driver\Manager::executeBulkWrite() - Execute one or more write operations Mon ...
https://man.mtool.work/php/8.3/mongodb-driver-bulkwrite.delete.html
MongoDB\Driver\BulkWrite::__construct — Create a new BulkWrite | PHP 8.3 9927
MongoDB\Driver\BulkWrite::__construct (mongodb >=1.0.0) MongoDB\Driver\BulkWrite::__construct — Create a new BulkWrite 説明 public function MongoDB\Driver\BulkWrite::__construct ( ? array $options = null ) Constructs a new MongoDB\Driver\BulkWrite ... to which one or more write operations may be added. The write(s) may then be executed with MongoDB\Driver\Manager::executeBulkWrite() . パラメータ options ( array ) options Option Type Description Default bypassDocumentValidation bool If true , allows in ... ded the "comment" and "let" options. PECL mongodb 1.1.0 Added the "bypassDocumentValidation" option. 例 例1 MongoDB\Driver\BulkWrite::__construct() example <?php $bulk = new MongoDB\Driver\BulkWrite ([ 'ordered' => true ]); $bulk -> delete ([]); $bulk -> ... ( 'mongodb://localhost:27017' ); $writeConcern = new MongoDB\Driver\WriteConcern ( 1 ); try { $result = $manager -> executeBulkWrite ( 'db.collection' , $bulk , [ 'writeConcern' => $writeConcern ]); } catch ( MongoDB\Driver\Exception\BulkWriteException $e ...
https://man.mtool.work/php/8.3/mongodb-driver-bulkwrite.construct.html
MongoDB\Driver\BulkWrite::update — Add an update operation to the bulk | PHP 8.... 9237
MongoDB\Driver\BulkWrite::update (mongodb >=1.0.0) MongoDB\Driver\BulkWrite::update — Add an update operation to the bulk 説明 public function MongoDB\Driver\BulkWrite::update ( array | object $filter , array | object $newObj , ? array $upd ... ateOptions = null ): void Adds an update operation to the MongoDB\Driver\BulkWrite . パラメータ filter ( array | object ) The » query predicate . An empty predicate will match all documents in the collecti ... PECL mongodb 1.4.0 Added the "arrayFilters" option. PECL mongodb 1.2.0 Added the "collation" option. 例 例1 MongoDB\Driver\BulkWrite::update() example <?php $bulk = new MongoDB\Driver\BulkWrite ; $bulk -> update ( [ 'x' => 2 ], [ '$set' => [ 'y' => 3 ]], ... 'upsert' => false ] ); $manager = new MongoDB\Driver\Manager ( 'mongodb://localhost:27017' ); $result = $manager -> executeBulkWrite ( 'db.collection' , $bulk ); ?> 参考 MongoDB\Driver\Manager::executeBulkWrite() - Execute one or more write operations Mon ...
https://man.mtool.work/php/8.3/mongodb-driver-bulkwrite.update.html
MongoDB\Driver\Server::executeBulkWrite — Execute one or more write operations ... 9163
MongoDB\Driver\Server::executeBulkWrite (mongodb >=1.0.0) MongoDB\Driver\Server::executeBulkWrite — Execute one or more write operations on this server 説明 final public function MongoDB\Driver\Server::executeBulkWrite ( string $namespace , ... MongoDB\Driver\BulkWrite $bulk , ? array $options = null ): MongoDB\Driver\WriteResult Executes one or more write operations on this server. A Mong ... oDB\Driver\BulkWrite can be constructed with one or more write operations of varying types (e.g. updates, deletes, and inserts). The driver wil ... . パラメータ namespace ( string ) A fully qualified namespace (e.g. "databaseName.collectionName" ). bulk ( MongoDB\Driver\BulkWrite ) The write(s) to execute. options options Option Type Description session MongoDB\Driver\Session A session to associate w ...
https://man.mtool.work/php/8.3/mongodb-driver-server.executebulkwrite.html
MongoDB\Driver\Manager::executeBulkWrite — Execute one or more write operations... 8855
MongoDB\Driver\Manager::executeBulkWrite (mongodb >=1.0.0) MongoDB\Driver\Manager::executeBulkWrite — Execute one or more write operations 説明 final public function MongoDB\Driver\Manager::executeBulkWrite ( string $namespace , MongoDB\Dri ... ver\BulkWrite $bulk , ? array $options = null ): MongoDB\Driver\WriteResult Executes one or more write operations on the primary server. ... A MongoDB\Driver\BulkWrite can be constructed with one or more write operations of varying types (e.g. updates, deletes, and inserts). The driver wil ... . パラメータ namespace ( string ) A fully qualified namespace (e.g. "databaseName.collectionName" ). bulk ( MongoDB\Driver\BulkWrite ) The write(s) to execute. options options Option Type Description session MongoDB\Driver\Session A session to associate w ...
https://man.mtool.work/php/8.3/mongodb-driver-manager.executebulkwrite.html
MongoDB\Driver\WriteError::getIndex — Returns the index of the write operation ... 8635
MongoDB\Driver\WriteError::getIndex (mongodb >=1.0.0) MongoDB\Driver\WriteError::getIndex — Returns the index of the write operation corresponding to this WriteError 説明 final public function MongoDB\Driver\WriteError::getIndex (): int パラ ... メータ この関数にはパラメータはありません。 戻り値 Returns the index of the write operation (from MongoDB\Driver\BulkWrite ) corresponding to this WriteError. エラー / 例外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument par ... 例1 MongoDB\Driver\WriteError::getIndex() example <?php $manager = new MongoDB\Driver\Manager ; $bulk = new MongoDB\Driver\BulkWrite ; $bulk -> insert ([ '_id' => 1 ]); $bulk -> insert ([ '_id' => 1 ]); try { $manager -> executeBulkWrite ( 'db.collection' ... , $bulk ); } catch( MongoDB\Driver\Exception\BulkWriteException $e ) { var_dump ( $e -> getWriteResult ()-> getWriteErrors ()[ 0 ]-> getIndex ()); } ?> 上の例の出力は、 たとえば ...
https://man.mtool.work/php/8.3/mongodb-driver-writeerror.getindex.html
PREV 1 2 3 4 5 6 NEXT