Commit Graph

66 Commits

Author SHA1 Message Date
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
Geir Magnusson Jr
232a7f7169 Clarify license to be the Apache License v2.0. Was a
mix and the readme still reflected AGPL
2009-02-15 08:24:14 -05:00
Jim Menard
4302de0227 set TCP_NODELAY for db sockets. 2009-02-10 13:32:40 -05:00
Jim Menard
8ecc8cb305 Remove debug warnings. 2009-02-05 15:59:44 -05:00
Jim Menard
d5f9f024ed Flush after every socket write. Nil out @socket earlier during close. Bumped patch version number. 2009-02-05 09:53:10 -05:00
Jim Menard
60dcb19e87 New password digest format. 2009-01-30 16:49:19 -05:00
Jim Menard
b337150eb2 comment fix 2009-01-23 13:54:57 -05:00
Jim Menard
f9c9eefdb4 Added error? and error() methods to DB. 2009-01-23 13:47:27 -05:00
Jim Menard
3ffc8942b0 Changed Mongo#new so it takes a Hash for paired servers. 2009-01-23 13:30:59 -05:00
Jim Menard
d01a4f5fdb Added auto_reconnect and slave_ok options and behavior to DB connections. 2009-01-23 11:47:22 -05:00
Jim Menard
796d052da0 Removed add_user and delete_user because security spec is not solidified. 2009-01-22 08:36:42 -05:00
Jim Menard
3e33811425 Fixed MD5 stuff so it works with Ruby 1.9. Bumped gem patch version. 2009-01-21 11:52:43 -05:00
Jim Menard
6b6b90b390 Database authentication. 2009-01-21 11:26:18 -05:00
Jim Menard
d3d0d5a16e Improved error messages. 2009-01-20 15:59:07 -05:00
Jim Menard
623a22ceda DB can have PK factory. Collection#insert returns objects inserted (possibly modified by PK factory). 2009-01-16 16:10:52 -05:00
Jim Menard
e0162aebb9 Level 1 support:
- Added PK factory support to the db class. Documented it in the README.

- Mongo#db now takes an options hash (right now, for :strict and :pk) and
  passes it in to the DB constructor.
2009-01-16 14:41:53 -05:00
Jim Menard
94f5214e45 Simplified DB#collection logic. Removed assert that only worked coincidentally. 2009-01-16 13:24:49 -05:00
Jim Menard
711cd4ea55 removed unnecessary require that causes warnings about redefining DEFAULT_PORT 2009-01-15 09:35:25 -05:00
Jim Menard
c3d73e4151 Mongo and DB ctors can now take array of nodes. Tests now close @db in teardown. 2009-01-14 18:37:28 -05:00
Jim Menard
fdb4ed7dc5 New switch_to_master db method. Reorganized db tests a bit. 2009-01-14 15:49:49 -05:00
Jim Menard
abf5b7f8f0 Comment. Removed unneeded require. 2009-01-14 15:36:17 -05:00
Jim Menard
50070c2efa Support for hints. 2009-01-13 15:51:41 -05:00
Jim Menard
61a0244c4c Pass Collection object, not name, to query so that we can access its hint fields at query time. 2009-01-13 15:38:46 -05:00
Jim Menard
1afd968f5d Added Cursor#explain. Made query sends lazy. 2009-01-13 14:02:16 -05:00
Jim Menard
dd48ec13ab Added DB#master method. 2009-01-13 13:08:04 -05:00
Jim Menard
60ab3d99dc Implemented Admin#profiling_info. 2009-01-07 15:58:54 -05:00
Jim Menard
15055794c7 Beginnings of Admin implementation. 2009-01-07 15:36:12 -05:00
Jim Menard
3473d026a6 Added synchronization 2009-01-07 11:46:38 -05:00