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
41c95a0392
refactoring: moved receive methods from cursor to db class.
2009-11-04 17:46:15 -05:00
Kyle Banker
95f3686119
Restored pretty messages for logging.
2009-11-02 15:04:06 -05:00
Kyle Banker
44ff6c5918
Checking response on buildinfo command.
2009-11-02 13:22:46 -05:00
Kyle Banker
67b7f6b375
Refactored Query class into Cursor class.
2009-10-22 14:10:12 -04:00
Kyle Banker
de5c078cec
Finished removing Message classes. Made Cursor#close threadsafe.
2009-10-21 10:11:33 -04:00
Kyle Banker
b938765ac0
Removed GetMoreMessage and QueryMessage classes with initial refactoring.
2009-10-20 15:44:46 -04:00
Kyle Banker
cced8ae5b7
Removed InsertMessage, RemoveMessage, and UpdateMessage, and refactored accordingly.
2009-10-19 17:14:41 -04:00
Kyle Banker
f642b0b3bd
Simplified mutex creation
2009-10-19 11:46:59 -04:00
Kyle Banker
4e2781faf1
Raise exception if connecting to single slave with slave_ok set to false; pass slave_ok on to queries when set to true.
2009-10-15 12:25:25 -04:00
John Nunemaker
89d420780f
Added logger convenience methods to connection and database. Makes it possible to use the logger instance in the driver from the outside world.
2009-10-08 21:13:59 +08:00
Mike Dirolf
79e76be9df
add DB#last_status method
2009-10-01 12:01:37 -04:00
Mike Dirolf
de6fef357b
driver was sending hard limits where it should've sent soft, and vice-versa. fix and add tests for this
2009-09-30 10:49:08 -04:00
Mike Dirolf
2b701119e1
complete deprecation of a bunch of stuff
2009-09-17 15:28:45 -04:00
Mike Dirolf
78f0b181e2
minor: clean up
2009-09-11 12:19:03 -04:00
Mike Dirolf
903e7136cf
no logger by default. don't log timing because it's misleading for queries. add tests and documentation for logger
2009-09-11 12:12:24 -04:00
Cyril Mougel
5860333ed4
improve logger and fix all test with logging system
2009-09-11 00:02:03 +02:00
Cyril Mougel
a7ec07a957
implement a little logger with log time and query
2009-09-10 23:24:06 +02:00
Mike Dirolf
1124c05f1f
DB#collections method, thanks to Durran Jordan and Les Hill
2009-08-27 16:29:41 -04:00
Mike Dirolf
604f85513f
fix paired connection find master
2009-08-24 10:51:15 -04:00
Mike Dirolf
94fe53d96b
DEPRECATE Mongo::Mongo in favor of Mongo::Connection
2009-08-20 18:48:09 -04:00
Mike Dirolf
e65dd99667
API CHANGE: moving XGen::Mongo::Driver and XGen::Mongo to Mongo and XGen::Mongo::GridFS to GridFS
2009-08-20 10:50:48 -04:00
Mike Dirolf
c6969fcb4d
eval raises OperationFailure on error. test for group that already passes
2009-08-19 15:37:29 -04:00
Mike Dirolf
7b4e51e825
deprecate DB#count and passing a selector to Collection#count
2009-08-18 11:48:16 -04:00
Mike Dirolf
047fc60c91
allow [] on DB, Collection instances to get collections/sub-collections
2009-08-17 11:11:03 -04:00
Mike Dirolf
723f823ea1
API CHANGE _id is aded to hash instances that get inserted / saved
2009-08-14 17:26:50 -04:00
Mike Dirolf
28a80f1b5e
Deprecate Collection#find_first in favor of Collection#find_one, also improve docs
2009-08-14 15:39:49 -04:00
Mike Dirolf
6cb8c9f49b
API CHANGE Add :safe option for Collection#insert and Collection#save
...
The API change is minor: Collection#insert({...}, {...}, {...}) no
longer works for inserting multiple documents - instead you must pass
an explicit Array: Collection#insert([{...}, {...}, {...}])
2009-08-14 14:25:29 -04:00
Mike Dirolf
23e09141a0
better error checking for database names
2009-08-13 16:26:51 -04:00
Mike Dirolf
a41a88d0f2
deprecating DB#modify_in_db
2009-08-13 15:24:05 -04:00
Mike Dirolf
1e4728a77f
fix a deadlock with threaded queries
2009-08-10 16:10:52 -04:00
Mike Dirolf
691e65f684
API CHANGE: fixing DB#collection_names() - only return collection name, not full name. only return names of valid collections on this database
2009-08-06 15:52:07 -04:00
Mike Dirolf
91d6ab4caa
rename collection
2009-08-04 14:16:02 -04:00
Paul Dlug
6b9b922266
Generate _id on the client side if no _id is provided to insert/save. The generated ObjectID (or array of ObjectID's in the case of a multiple insert) is return. Closes RUBY-22 and RUBY-23.
...
Signed-off-by: Mike Dirolf <mike@dirolf.com>
2009-07-28 21:53:59 +08:00
Mike Dirolf
c6536f0d27
count() is 0 for non-existant collections, not an error
2009-06-18 09:38:55 -04:00
Mike Dirolf
70fb0a6e6a
actually send bulk insert messages
2009-06-08 09:52:18 -04:00
Mike Dirolf
cb3823f48f
Merge branch 'master' of git://github.com/jnunemaker/mongo-ruby-driver into jnunemaker/master
2009-06-02 14:20:19 -04:00
Mike Dirolf
25e960441b
API CHANGE: better, less redundant API for index_information
2009-06-02 11:24:52 -04:00
Mike Dirolf
d87a7da617
BUG RUBY-15 don't check key names on create_index operations
2009-06-02 09:38:31 -04:00
John Nunemaker
4d7f06a6be
Implemented that index fields can also be specified with symbols.
2009-05-31 22:16:01 -04:00
Mike Dirolf
cabca61e0d
previous_error and reset_error_history. snuck in a quick fix to OrderedHash equality
2009-05-26 15:26:20 -04:00
Mike Dirolf
cea73c2712
dereference helper method
2009-04-28 14:55:36 -04:00
Mike Dirolf
1312c70677
add support for unique index creation
2009-04-21 14:44:57 -04:00
Mike Dirolf
a2898effb4
no longor drop_indexes when we drop_collection
2009-04-16 09:55:50 -04:00
Mike Dirolf
13c407cd85
support for db.eval
2009-03-13 11:03:52 -04:00
Mike Dirolf
37044a38f5
rescue a few more types of exceptions
2009-03-12 16:40:02 -04:00
Mike Dirolf
7e6e11ba99
only mask socket errors
2009-03-12 14:31:37 -04:00
Mike Dirolf
79b3df3c9e
do all recv's in a loop. remove debugging cruft
2009-03-04 14:28:00 -05:00
Mike Dirolf
9b9f14ce2e
overhaul create_index - don't allow clients to specify their own name, allow descending indexes
2009-02-26 12:06:03 -05:00