|
MongoCursor::timeout(PECL mongo >=1.0.3) MongoCursor::timeout — Sets a client-side timeout for this query ОписаниеA timeout can be set at any time and will affect subsequent queries on the cursor, including fetching more results from the database. For example, to wait forever for an initial response but timeout after 100 ms for subsequent results, one could say:
<?php A timeout of 0 (or a negative number) will wait forever so it can be used to reset the cursor if a timeout is no longer needed. Список параметров
Возвращаемые значенияThis cursor. ПримерыПример #1 MongoCursor::timeout() example A query where the cursor waits for one second for a response.
<?php ОшибкиCauses methods that fetch results to throw MongoCursorTimeoutExceptions if the query takes longer than the number of milliseconds specified. |
|