mongo-ruby-driver/lib/mongo
John Nunemaker 53ad43fedc Added transformer concept.
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.
2011-03-23 15:26:34 -04:00
..
gridfs RUBY-226 minor: license update 2011-01-17 12:26:32 -05:00
util RUBY-231 RUBY-250 Validate socket against pid 2011-03-17 22:15:14 -04:00
collection.rb Added transformer concept. 2011-03-23 15:26:34 -04:00
connection.rb Implementation of the 'ping' command. Probably better suited for the 'active?' method. 2011-03-04 10:51:18 -05:00
cursor.rb Added transformer concept. 2011-03-23 15:26:34 -04:00
db.rb RUBY-232 handle authentication with connection pooling 2011-01-31 14:47:38 -05:00
exceptions.rb RUBY-226 minor: license update 2011-01-17 12:26:32 -05:00
repl_set_connection.rb RUBY-247 Improved replica set docs. 2011-03-12 08:40:29 -05:00