diff --git a/README.rdoc b/README.rdoc index 248af2c..b392f8f 100644 --- a/README.rdoc +++ b/README.rdoc @@ -217,6 +217,18 @@ object or call the :strict= method: The method DB#strict? returns the current value of that flag. +== Cursors + +Random cursor fun facts: + +- Cursors are enumerable. + +- The query doesn't get run until you actually attempt to retrieve data from a + cursor. + +- Cursors have a to_a method. + + = Testing diff --git a/examples/types.rb b/examples/types.rb index f04d3df..4c9998f 100644 --- a/examples/types.rb +++ b/examples/types.rb @@ -35,6 +35,6 @@ coll.insert('array' => [1, 2, 3], 'null' => nil, 'symbol' => :zildjian) -coll.find().each { |row| pp row } +pp coll.find().next_object coll.clear