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
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
Jim Menard
26b88efd3b
Bug fixes:
...
- Make sure Query#fields returns a hash, not an array.
- Fix query limit by passing limit number to cursor and having it enforce the
limit. (Database returns limit as first batch, but will continue to return
data after the limit if requested.)
Improvements:
- Query#new can take a single field name instead of an array
- A few doc comment improvements here and there.
2009-01-07 09:46:30 -05:00
Jim Menard
f709bc6290
Updated copyright dates.
2009-01-06 10:51:01 -05:00
Jim Menard
459381b9e4
Guard against nil options in DB#create_collection. Doc fix.
2008-12-17 13:14:42 -05:00
Jim Menard
95e75995f6
Doc tweaks
2008-12-17 11:49:06 -05:00
Jim Menard
aee3ae2c9d
More documentation
2008-12-17 11:43:08 -05:00
Jim Menard
02cd38fce0
Added XGen::Mongo::Driver::DB.master?
2008-12-16 17:35:31 -05:00
Jim Menard
103d7e5c62
New optional "strict" mode for databases.
2008-12-16 17:08:15 -05:00
Jim Menard
c3b1225605
Removed automatic _id creation.
2008-12-08 13:56:48 -05:00
Jim Menard
7669900126
Lots of fixes.
...
- Introduced OrderedHash because db commands require that the command key be
first.
- Fixed BSON (de)serialization of object ids.
- Simplified @coll.drop_indexes.
- Renamed some method parameters to make their type more clear (for example,
"collection" became "collection_name").
- Got the index_information test working.
2008-12-08 11:38:42 -05:00
Jim Menard
067ec66812
Fixed index info retrieval
2008-12-08 08:33:29 -05:00
Jim Menard
51dde79ba4
Add _id to inserted records. Fixed ObjectID load, save, and generation.
2008-12-04 08:37:42 -05:00
Jim Menard
99db98f6e8
Made db.full_coll_name public. Wrote a test for it.
2008-12-02 07:26:45 -05:00
Jim Menard
8b82d716dd
Added to to-do list.
2008-12-02 07:22:32 -05:00
Jim Menard
acf5cc994b
More tests. Fixed some db client bugs.
2008-12-02 07:20:29 -05:00
Jim Menard
8459fcad5b
Added call to db.count to example. Need to see why it's not working.
2008-12-01 19:36:20 -05:00
Jim Menard
5e3815bf69
first commit
2008-11-21 20:00:51 -05:00