Results of 1 - 10 of about 19 for writeError (0.006 sec.)
- The MongoDB\Driver\WriteError class | PHP 8.3 13147
- The MongoDB\Driver\WriteError class (mongodb >=1.0.0) はじめに The MongoDB\Driver\WriteError class encapsulates information about a write error and may be returned as an array element from MongoDB\Driver\WriteResult::getWriteErrors() . クラ
... ス概要 final class MongoDB\Driver\WriteError { /* プロパティ */ public readonly string $ message ; public readonly int $ code ; public readonly int $ index ; public re ... r null if not available. 変更履歴 バージョン 説明 PECL mongodb 2.3.0 Added public readonly properties. 目次 MongoDB\Driver\WriteError::getCode — Returns the WriteError's error code MongoDB\Driver\WriteError::getIndex — Returns the index of the write operat ... ion corresponding to this WriteError MongoDB\Driver\WriteError::getInfo — Returns metadata document for the WriteError MongoDB\Driver\WriteError::getMessage — ...
-
https://man.mtool.work/php/8.3/class.mongodb-driver-writeerror.html
- MongoDB\Driver\WriteError::getCode — Returns the WriteError's error code | PHP ... 10706
- MongoDB\Driver\WriteError::getCode (mongodb >=1.0.0) MongoDB\Driver\WriteError::getCode — Returns the WriteError's error code 説明 final public function MongoDB\Driver\WriteError::getCode (): int パラメータ この関数にはパラメータはありません
... 。 戻り値 Returns the WriteError's error code. エラー / 例外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 例 例1 Mo ... ngoDB\Driver\WriteError::getCode() example <?php $manager = new MongoDB\Driver\Manager ; $bulk = new MongoDB\Driver\BulkWrite ; $bulk -> insert ([ ... collection' , $bulk ); } catch( MongoDB\Driver\Exception\BulkWriteException $e ) { var_dump ( $e -> getWriteResult ()-> getWriteErrors ()[ 0 ]-> getCode ()); } ?> 上の例の出力は、 たとえば以下のようになります。 int(11000) ...
-
https://man.mtool.work/php/8.3/mongodb-driver-writeerror.getcode.html
- MongoDB\Driver\WriteError::getInfo — Returns metadata document for the WriteErr... 10603
- MongoDB\Driver\WriteError::getInfo (mongodb >=1.0.0) MongoDB\Driver\WriteError::getInfo — Returns metadata document for the WriteError 説明 final public function MongoDB\Driver\WriteError::getInfo (): ? object パラメータ この関数にはパラメー
... タはありません。 戻り値 Returns the metadata document for the WriteError, or null if no metadata is available. エラー / 例外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument p ...
-
https://man.mtool.work/php/8.3/mongodb-driver-writeerror.getinfo.html
- MongoDB\Driver\WriteError::getIndex — Returns the index of the write operation ... 10501
- 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 parsing errors. 例 例1 MongoDB\Driver\ ... collection' , $bulk ); } catch( MongoDB\Driver\Exception\BulkWriteException $e ) { var_dump ( $e -> getWriteResult ()-> getWriteErrors ()[ 0 ]-> getIndex ()); } ?> 上の例の出力は、 たとえば以下のようになります。 int(1) 参考 MongoDB\Driver\BulkWrite 他のマニ ...
-
https://man.mtool.work/php/8.3/mongodb-driver-writeerror.getindex.html
- MongoDB\Driver\WriteError::getMessage — Returns the WriteError's error message ... 10450
- MongoDB\Driver\WriteError::getMessage (mongodb >=1.0.0) MongoDB\Driver\WriteError::getMessage — Returns the WriteError's error message 説明 final public function MongoDB\Driver\WriteError::getMessage (): string パラメータ この関数にはパラメ
... ータはありません。 戻り値 Returns the WriteError's error message. エラー / 例外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 例 例1 ... MongoDB\Driver\WriteError::getMessage() example <?php $manager = new MongoDB\Driver\Manager ; $bulk = new MongoDB\Driver\BulkWrite ; $bulk -> insert ... collection' , $bulk ); } catch( MongoDB\Driver\Exception\BulkWriteException $e ) { var_dump ( $e -> getWriteResult ()-> getWriteErrors ()[ 0 ]-> getMessage ()); } ?> 上の例の出力は、 たとえば以下のようになります。 string(70) "E11000 duplicate key error ind ...
-
https://man.mtool.work/php/8.3/mongodb-driver-writeerror.getmessage.html
- MongoDB\Driver\WriteResult::getWriteErrors — Returns any write errors that occu... 8810
- MongoDB\Driver\WriteResult::getWriteErrors (mongodb >=1.0.0) MongoDB\Driver\WriteResult::getWriteErrors — Returns any write errors that occurred 説明 final public function MongoDB\Driver\WriteResult::getWriteErrors (): array パラメータ この
... 関数にはパラメータはありません。 戻り値 Returns an array of MongoDB\Driver\WriteError objects for any write errors encountered during the write operation. The array will be empty if no write errors occurred. ... Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 例 例1 MongoDB\Driver\WriteResult::getWriteErrors() with a single error <?php $manager = new MongoDB\Driver\Manager ; /* By default, bulk write operations are executed ser ... ollection' , $bulk ); } catch ( MongoDB\Driver\Exception\BulkWriteException $e ) { var_dump ( $e -> getWriteResult ()-> getWriteErrors ()); } ?> 上の例の出力は、 たとえば以下のようになります。 array(1) { [0]=> object(MongoDB\Driver\WriteError)#5 (4) { ["me ...
-
https://man.mtool.work/php/8.3/mongodb-driver-writeresult.getwriteerrors.html
- MongoDB\Driver\Exception\BulkWriteCommandException::getWriteErrors — Returns an... 8708
- MongoDB\Driver\Exception\BulkWriteCommandException::getWriteErrors (mongodb >=2.1.0) MongoDB\Driver\Exception\BulkWriteCommandException::getWriteErrors — Returns any write errors 説明 final public function MongoDB\Driver\Exception\BulkWrite
... CommandException::getWriteErrors (): array パラメータ この関数にはパラメータはありません。 戻り値 An array of any MongoDB\Driver\WriteError s that occurre ... ill contain at most one entry if the bulk write was ordered. 例 例1 MongoDB\Driver\Exception\BulkWriteCommandException::getWriteErrors() example <?php $manager = new MongoDB\Driver\Manager ; $bulk = new MongoDB\Driver\BulkWriteCommand ([ 'ordered' => false ... executeBulkWriteCommand ( $bulk ); } catch ( MongoDB\Driver\Exception\BulkWriteCommandException $e ) { var_dump ( $e -> getWriteErrors ()); } ?> 上の例の出力は、 たとえば以下のようになります。 array(2) { [2]=> object(MongoDB\Driver\WriteError)#5 (4) { ["me ...
-
https://man.mtool.work/php/8.3/mongodb-driver-bulkwritecommandexception.getwrite...
- The MongoDB\Driver\BulkWrite class | PHP 8.3 8349
- 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
... teConcernError -> getInfo (), true ) ); } // Check if any write operations did not complete at all foreach ( $result -> getWriteErrors () as $writeError ) { printf ( "Operation#%d: %s (%d)\n" , $writeError -> getIndex (), $writeError -> getMessage (), $wri ... :executeBulkWrite() MongoDB\Driver\WriteResult MongoDB\Driver\WriteConcern MongoDB\Driver\WriteConcernError MongoDB\Driver\WriteError 目次 MongoDB\Driver\BulkWrite::__construct — Create a new BulkWrite MongoDB\Driver\BulkWrite::count — Count number of writ ...
-
https://man.mtool.work/php/8.3/class.mongodb-driver-bulkwrite.html
- MongoDB\Driver\BulkWrite::__construct — Create a new BulkWrite | PHP 8.3 8213
- 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\Bu
... teConcernError -> getInfo (), true ) ); } // Check if any write operations did not complete at all foreach ( $result -> getWriteErrors () as $writeError ) { printf ( "Operation#%d: %s (%d)\n" , $writeError -> getIndex (), $writeError -> getMessage (), $wri ...
-
https://man.mtool.work/php/8.3/mongodb-driver-bulkwrite.construct.html
- MongoDB\Driver\Manager::executeBulkWrite — Execute one or more write operations... 8008
- 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
... ption if authentication is needed and fails. Throws MongoDB\Driver\Exception\BulkWriteException on any write failure (e.g. write error, failure to apply a write concern) Throws MongoDB\Driver\Exception\RuntimeException on other errors. 変更履歴 バージョン ... var_export ( $writeConcernError -> getInfo (), true )); } /* If a write could not happen at all */ foreach ( $result -> getWriteErrors () as $writeError ) { printf ( "Operation#%d: %s (%d)\n" , $writeError -> getIndex (), $writeError -> getMessage (), $wri ...
-
https://man.mtool.work/php/8.3/mongodb-driver-manager.executebulkwrite.html