Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Random cursor fun facts.

  • Loading branch information...
commit c630940c46197bbb6db5a1b1673ede8e71192601 1 parent 04b0b92
Jim Menard authored
Showing with 13 additions and 1 deletion.
  1. +12 −0 README.rdoc
  2. +1 −1  examples/types.rb
View
12 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
View
2  examples/types.rb
@@ -35,6 +35,6 @@
'null' => nil,
'symbol' => :zildjian)
-coll.find().each { |row| pp row }
+pp coll.find().next_object
coll.clear
Please sign in to comment.
Something went wrong with that request. Please try again.