Skip to content

Commit b002a3f

Browse files
committed
Quick note about var_dump()ing the cursor, rather then calling iterator_to_array()
1 parent 62560b0 commit b002a3f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/batch.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ foreach ($result->getUpsertedIds() as $index => $id) {
120120

121121
$query = new MongoDB\Driver\Query(array("viking" => false));
122122
$cursor = $manager->executeQuery("db.collection", $query);
123+
/* Note that var_dump()ing the $cursor will print out all sorts of debug information
124+
* about the cursor, such as ReadPreferences used, the query executed, namespace,
125+
* query flags, and the current batch information */
123126
var_dump(iterator_to_array($cursor));
124127

125128
?>

0 commit comments

Comments
 (0)