Permalink
Browse files

Random cursor fun facts.

  • Loading branch information...
1 parent 04b0b92 commit c630940c46197bbb6db5a1b1673ede8e71192601 Jim Menard committed Feb 3, 2009
Showing with 13 additions and 1 deletion.
  1. +12 −0 README.rdoc
  2. +1 −1 examples/types.rb
View
@@ -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
View
@@ -35,6 +35,6 @@
'null' => nil,
'symbol' => :zildjian)
-coll.find().each { |row| pp row }
+pp coll.find().next_object
coll.clear

0 comments on commit c630940

Please sign in to comment.