Commit Graph

51 Commits

Author SHA1 Message Date
Kyle Banker a6cc09e50c RUBY-236 more timeout tweaks and tests 2011-03-29 11:46:29 -04:00
Kyle Banker 2bfe205c51 Merged wpiekutowski's commits to enable warnings
on test suite and clean up some code.

Conflicts:
	test/cursor_test.rb
2011-03-23 16:02:04 -04:00
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
Kyle Banker 4f3937d6a4 Map-reduce doc update for v1.8 2011-02-23 14:43:23 -05:00
Kyle Banker 24cfde5ef6 Updated map-reduce tests and docs for v1.8 map-reduce options 2011-02-22 17:47:47 -05:00
Wojciech Piekutowski 80a44efb68 Prevent outer local variable shadowing 2011-02-20 17:18:08 +01:00
Kyle Banker 65f59ba2d6 RUBY-222 Collection#group gets a new, reasonable API 2011-01-06 10:05:19 -05:00
Kyle Banker af0ecde925 RUBY-204 Collection construct now has analogous API
to DB constructor (i.e., name comes first)
2011-01-05 09:44:46 -05:00
Kyle Banker ae202d590e RUBY-192; Updates for Collection#ensure_index 2011-01-03 16:16:24 -05:00
Kyle Banker 49d7bb0883 minor: specify mapreduce output collection (required as of 1.7.5) 2010-12-30 15:43:35 -05:00
Kyle Banker 96e1adbb23 minor: ensure index tests 2010-12-15 15:16:36 -05:00
Kyle Banker 03bf0a18de minor: Collection#remove returns true on nonsafe remove 2010-12-02 12:47:50 -05:00
Kyle Banker 29dfe390c5 RUBY-196 tweaks to Collection#ensure_index 2010-11-11 17:41:31 -05:00
Matthew Rathbone d33ddfb8e0 added ensure_index 2010-11-11 16:21:23 -05:00
Kyle Banker 9d25efece4 Bug fix on Collection#rename 2010-11-09 13:45:33 -05:00
Kyle Banker b4d5448179 Create index concurrency fix 2010-11-09 13:34:28 -05:00
Kyle Banker 59ba221066 minor: added a new group test 2010-11-09 12:04:47 -05:00
Kyle Banker a2f501924e Specify pk factory on Collection.new as a :pk option 2010-11-03 18:36:29 -04:00
Kyle Banker 5aa8721b25 Allow idiomatic :drop_dups in addition to :dropDups
on index creation.

Don't raise exception if :dropDups results in duplicate key error.
2010-11-02 14:50:02 -04:00
Kyle Banker 80044b9a58 RUBY-187 All tests can now use custom host and port;
Minor test fixes.
2010-10-13 17:09:23 -04:00
Kyle Banker 2a7b089a9b BSON for JRuby 2010-09-30 09:43:17 -04:00
Kyle Banker a20d0c5f98 minor: test fix getlasterror 2010-09-13 11:12:26 -04:00
Hongli Lai (Phusion) 05772177f7 Fix DB#error and DB#last_status deprecation warnings in unit tests. 2010-09-13 10:48:08 -04:00
Kyle Banker c7c309b00d RUBY-158 deprecate BSON::ObjectID for BSON::ObjectId 2010-08-24 12:49:23 -04:00
Kyle Banker db8ddd059b minor: silence some warning due to deprecaton 2010-08-04 16:47:13 -04:00
Kyle Banker 065517ac29 Fixed test bug; better replication ack tests; deprecated DB#error and DB#last_status for DB#get_last_error 2010-08-02 18:19:54 -04:00
Kyle Banker 66e9508f61 Connection#send_message should return bytes sent 2010-07-27 22:19:25 -04:00
Kyle Banker 969ec6f644 Don't check keys on Collection#map_reduce 2010-07-21 08:23:55 -04:00
Kyle Banker c9573f05ad minor: fix default timeout option 2010-07-16 14:04:13 -04:00
Kyle Banker f62a54416d test for RUBY-152 2010-07-13 14:49:59 -04:00
Kyle Banker c25f1f5997 RUBY-144 allow map_reduce to return raw command (and not just instantiated results collection) 2010-07-09 15:29:11 -04:00
Kyle Banker 078372f869 minor: test description 2010-06-25 06:10:17 -05:00
Kyle Banker 4712a68468 RUBY-133 maximum insert size 2010-06-15 10:24:31 -04:00
Kyle Banker 31d2483294 RUBY-137 specify index name 2010-06-14 14:20:12 -04:00
sleverbor ed76126a12 namespaced the OrderedHash class 2010-05-06 18:25:18 -07:00
Kyle Banker 065d97ca1c Replication acknowledgment RUBY-126 2010-05-04 16:00:05 -04:00
Kyle Banker 797fada848 make sure we support 2010-05-03 17:40:55 -04:00
Kyle Banker 55ebf36c1d minor: removed deprecation warning for new create_index api 2010-04-28 15:16:33 -04:00
Kyle Banker 494d451857 RUBY-123 check index types 2010-04-16 15:59:34 -04:00
Kyle Banker acc42dce65 RUBY-115 tailable cursors 2010-04-12 13:53:18 -04:00
Kyle Banker 84fb41c39f added Collection#stats and DB#stats 2010-04-06 18:29:39 -04:00
Kyle Banker 35dac1f31e added find_and_modify helper 2010-04-06 17:56:21 -04:00
Kyle Banker 45d3b91882 exception refinements for bson split 2010-04-05 18:24:31 -04:00
Kyle Banker 2e78eb6c66 RUBY-118 2010-04-05 15:48:35 -04:00
Kyle Banker c4d5cb641b renamed mongo_bson to bson 2010-04-05 10:39:55 -04:00
Kyle Banker b87e3dd3fb docs and tests for fields option with a hash 2010-03-27 08:58:16 -07:00
Kyle Banker 3e8c8d5c93 added error checking for array of arrays on index creation 2010-03-19 14:31:10 -04:00
Kyle Banker 367f9b32cc added indexing options: background, geo, dropDups, etc. 2010-03-16 15:59:26 -04:00
Kyle Banker 8f90cbfbf7 Collection#group as eval deprecation final stage 2010-02-23 12:42:17 -05:00
Kyle Banker 89fe06250e re-require shoulda; gridfs decoupling 2010-02-22 15:49:04 -05:00