MongoCursor::dead

(PECL mongo >=0.9.6)

MongoCursor::deadChecks if there are results that have not yet been sent from the database

Description

public MongoCursor::dead(): bool

The database sends responses in batches of documents, up to 4MB of documents per response. This method checks if the database has more batches or if the result set has been exhausted.

A cursor being "dead" does not mean that MongoCursor::hasNext() will return false, it only means that the database is done sending results to the client. The client should continue iterating through results until MongoCursor::hasNext() is false.

Parameters

This function has no parameters.

Return Values

Returns true if there are more results that have not yet been sent to the client, and false otherwise.

See Also