Commit Graph

68 Commits

Author SHA1 Message Date
Kyle Banker
a0da417c42 minor: :collect_on_error docs and tests. 2012-01-19 12:34:43 -05:00
Masahiro Nakagawa
5b1e09a6ce Add :collect_on_error option to collect invalid documents in bulk-insert 2012-01-19 12:34:43 -05:00
Kyle Banker
ebd31d0cd0 Merge pull request #79 from johnewart/fix_db_out_option
RUBY-389: Fix db output option on Collection#map_reduce
2012-01-06 12:04:10 -08:00
Kyle Banker
e4570c133d RUBY-356 clarify docs on continue_on_error 2012-01-06 14:53:23 -05:00
John Ewart
6c0b3723e9 Adding test for the :out => {:db …} key
Forgot to add the test in the last commit.
2011-12-15 08:06:01 -08:00
Kyle Banker
c06ac31867 Merge pull request #67 from myers/fix-for-warnings-in-ruby-1.8.6
minor: test suite fixed for warnings when running in 1.8.6
2011-11-28 10:34:48 -08:00
Kyle Banker
8bd94b0ac2 RUBY-370: allow :j option 2011-11-28 13:33:42 -05:00
Kyle Banker
1146e5692a RUBY-341 fix :max_scan and :show_disk_loc 2011-11-15 16:24:21 -05:00
Kyle Banker
83ac53202e minor: fix failing tests 2011-11-04 15:12:58 -04:00
Myers Carpenter
f179a106ea fix for warnings when running in 1.8.6 2011-10-18 16:59:57 -04:00
Kyle Banker
834b0db0af RUBY-307 Collection#count should take a query, skip, and limit. 2011-09-06 11:38:19 -04:00
Kyle Banker
a6ea525e3d RUBY-319 support continue_on_error insert flag 2011-08-29 12:04:01 -04:00
Kyle Banker
3c127984a3 RUBY-242 check BSON size on a per-connection basis. 2011-08-25 14:57:24 -04:00
Kyle Banker
a9b975eaaa RUBY-304 add Collection#capped? 2011-08-08 17:52:44 -04:00
Karl Seguin
50a54cdcc0 can drop an index using the same type of spec used to create an index 2011-05-31 19:52:50 +08:00
Peter Olsen
809dcf7e17 add test for ensure_index with drop_dups 2011-05-19 19:35:06 +00:00
Kyle Banker
1d3ffe37c7 minor: test fix for server versions < 1.8 2011-03-29 17:02:48 -04:00
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