tutorial: add hint about binding allDocs to find
This commit is contained in:
parent
cd4be93a02
commit
52bf1f6716
1 changed files with 5 additions and 1 deletions
|
@ -106,6 +106,10 @@ Querying for More Than One Document
|
||||||
|
|
||||||
> allDocs cursor
|
> allDocs cursor
|
||||||
|
|
||||||
|
You can combine these into one line:
|
||||||
|
|
||||||
|
> docs <- allDocs =<< find con curcol (toBsonDoc [("author", toBson "Mike")])
|
||||||
|
|
||||||
See nextDoc to modify cursor incrementally one at a time.
|
See nextDoc to modify cursor incrementally one at a time.
|
||||||
|
|
||||||
* Note: allDocs automatically closes the cursor when done, through nextDoc.
|
* Note: allDocs automatically closes the cursor when done, through nextDoc.
|
||||||
|
|
Loading…
Reference in a new issue