53ad43fedc
Can be passed to find/find_one, which in turn is passed to cursor. It is an optional block that makes it easier to turn documents that are returned into hashes. cursor = collection.find({...}, :transformer => Proc.new { |doc| User.load(doc) }) cursor.next # returns instance of User instead of ordered hash This will allow MongoMapper, ToyStore and other object mappers to take better advantage of Cursors. No more calling to_a and mapping to instances. |
||
---|---|---|
.. | ||
gridfs | ||
util | ||
collection.rb | ||
connection.rb | ||
cursor.rb | ||
db.rb | ||
exceptions.rb | ||
repl_set_connection.rb |