|
MongoDB\Driver\Manager::executeQueryExecute a database query 説明
final public MongoDB\Driver\Cursor MongoDB\Driver\Manager::executeQuery(string
$namespace , MongoDB\Driver\Query $query , arrayMongoDB\Driver\ReadPreferencenull $options = null )
Selects a server according to the パラメータ
戻り値Returns MongoDB\Driver\Cursor on success. エラー / 例外
変更履歴
例例1 MongoDB\Driver\Manager::executeQuery example
<?php 上の例の出力は以下となります。 object(stdClass)#6 (1) { ["x"]=> int(3) } object(stdClass)#7 (1) { ["x"]=> int(2) } 例2 Limiting execution time for a query
The
<?php If the query fails to complete after one second of execution time on the server, a MongoDB\Driver\Exception\ExecutionTimeoutException will be thrown. 参考
|