Random cursor fun facts.
This commit is contained in:
parent
04b0b926d4
commit
c630940c46
12
README.rdoc
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue