Commit Graph

94 Commits

Author SHA1 Message Date
Matthew Rathbone d33ddfb8e0 added ensure_index 2010-11-11 16:21:23 -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 68af3dbe8f Allow the setting of safe mode globally on the Connection,
DB, and Collection levels. The safe mode setting will
automatically be inherited down the hierarchy Connection ->
DB -> Collection -> (insert, update, remove). This default
can be overridden at any time. Connection#safe, DB#safe, and
Collection#safe will yield the current default value.
2010-11-03 17:36:08 -04:00
Kyle Banker afe8fe3167 RUBY-193 don't create gridfs indexes when slave_ok 2010-10-21 13:01:32 -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 7309d7e48b Path fixes for test in Ruby 1.9.2 2010-09-09 15:58:51 -04:00
Kyle Banker 300b442a94 Create logging message only when a logger is passed to the Connection.
Results in a pretty significant performance improvement.

Many thanks to Matt Taylor for noticing the unusual glut of calls
to ObjectId#to_s. See here: http://unhalting.com/?p=18
2010-09-08 14:27:27 -04:00
Kyle Banker 4bebf72fd3 minor: unit test fix 2010-08-24 12:06:23 -04:00
Kyle Banker 0afa5aa412 Initial replica set support 2010-07-19 12:07:46 -04:00
Kyle Banker c9573f05ad minor: fix default timeout option 2010-07-16 14:04:13 -04:00
Kyle Banker 86c50a0555 Removed deprecated options and methods. 2010-07-12 14:31:12 -04:00
Lincoln Stoll 6e3cc639f6 Allow hypens and underscores in URL credentials. 2010-06-24 12:51:16 -05:00
Kyle Banker 51140f8ea1 minor: support dash in host name on parse_uri 2010-06-14 22:06:55 -04:00
Kyle Banker c28b126267 RUBY-132 ensure socket closes on connect to master 2010-06-14 18:56:44 -04:00
Kyle Banker a7e2991c31 fix for boolean command response in core server 1.5.2 2010-05-31 22:52:03 -04:00
Kyle Banker 924a275ea3 check command response by default; better DB#command api 2010-05-18 16:17:17 -04:00
Kyle Banker c4d5cb641b renamed mongo_bson to bson 2010-04-05 10:39:55 -04:00
Houdini 33f4aca658 More flexible :fields option, supporting {}
This allows exact definition of the fields you want included in the query results. For example :fields => {:name => 1, :people => 0} will include the name key but exclude the people key.
2010-03-26 13:58:18 -07:00
Kyle Banker a94a870202 log messages read like valid ruby driver code 2010-03-23 22:40:43 -07:00
Kyle Banker f2bc05f51c merge new bson commits 2010-03-19 15:23:24 -04:00
Charles Remes a9b3c8e7a5 Try again: Split the BSON logic out to a separate gem
- changed the BSON constant to BSON_CODER and scoped it inside
      of a module

    - changed the directory layout for all of the BSON related files

    - updated the C extension to find the BSON files at their new
      directory locations

    - updated the C extension to use better/safer macros for accessing
      the C API; extension now compiles cleanly under rubinius/rbx

    - changed directory layout for BSON related tests

    - modified the Rakefile to understand the new layout
2010-03-17 14:55:19 -05:00
Kyle Banker 8faa243484 added sort to query logging RUBY-101 2010-03-15 11:51:22 -04:00
Kyle Banker c0e8a525bd reauthenticate on reconnect 2010-02-25 14:58:32 -05:00
Kyle Banker 89fe06250e re-require shoulda; gridfs decoupling 2010-02-22 15:49:04 -05:00
Kyle Banker 54a68c7438 minor: removed shoulda dependency 2010-02-19 19:17:38 -05:00
Kyle Banker f176a45a20 Connection.from_uri and Connection.paired. Connection API enhancement. 2010-02-17 15:15:07 -05:00
Kyle Banker a6310a0a4f not logging binary data RUBY-90 2010-02-08 13:48:18 -05:00
Kyle Banker f9ec4eca1d YARD and more specific exceptions for DB 2010-01-11 18:12:46 -05:00
Kyle Banker 5c1b3aed0f simplified connection pooling 2009-12-18 17:29:44 -05:00
Kyle Banker f8a6d1ebb9 minor: docs, whitespace, naming 2009-12-16 14:16:49 -05:00
Kyle Banker 23bb6c2192 minor: added tests for nonstandard port 2009-12-02 16:43:30 -05:00
Mike Dirolf 36423240a6 minor: oops parens were still giving a warning 2009-11-25 10:35:06 -05:00
Mike Dirolf 6151f95cd5 minor: remove paren warning 2009-11-25 10:25:56 -05:00
Mike Dirolf fc0248e94f minor: whitespace 2009-11-25 10:25:28 -05:00
Kyle Banker ab0d189832 Simplified message sending methods names; organized Connection 2009-11-24 14:23:43 -05:00
Kyle Banker 20562e96ab Tests passing for connection pooling. 2009-11-24 13:47:37 -05:00
Kyle Banker fcbdfdf8e4 Doc cleanup; merge cleanup 2009-11-23 16:03:33 -05:00
Kyle Banker 11a92349e9 Merged branch for initial connection pooling code 2009-11-23 15:20:05 -05:00
Kyle Banker 867783c665 Added support for multi-update (available in mongo >= 1.1.3) 2009-11-05 16:08:54 -05:00
Kyle Banker f891b4ece3 Updates and insert in safe mode are now thread-safe. 2009-11-05 15:14:48 -05:00
Kyle Banker 68bb1d2060 minor: Initial collection unit tests. Logging message update. 2009-11-02 15:50:16 -05:00
Kyle Banker 44ff6c5918 Checking response on buildinfo command. 2009-11-02 13:22:46 -05:00
Cyril Mougel bffc59ffb4 fix test on cursor 2009-10-23 23:30:30 +02:00
Kyle Banker 67b7f6b375 Refactored Query class into Cursor class. 2009-10-22 14:10:12 -04:00