Commit Graph

143 Commits

Author SHA1 Message Date
mbernstein
bdafae6eeb Added sort() method to Cursor Class, with tests and docs. 2009-09-17 15:07:36 -04:00
Mike Dirolf
3321a90739 remove redundant num_to_return from Cursor class. credits. clean up last commit 2009-09-16 17:52:41 -04:00
Kyle Banker
c397758d1d Added #limit and #offset methods for cursor objects
Signed-off-by: Mike Dirolf <mike@dirolf.com>
2009-09-17 05:38:00 +08:00
Mike Dirolf
b6901673bb always use hard limit for explain() 2009-09-16 10:39:52 -04:00
Mike Dirolf
86d2bf7186 minor: remove superfluous call 2009-09-14 14:28:01 -04:00
Mike Dirolf
496af2be9c fix for count when find has fields specified 2009-08-24 17:21:49 -04:00
Mike Dirolf
fd3b927771 API CHANGE no longer save internal array for to_a - means you can't call each or to_a after calling to_a already, doc updates 2009-08-21 14:11:59 -04:00
Mike Dirolf
6a43aaa94f minor: doc 2009-08-21 11:21:33 -04:00
Mike Dirolf
28e795e9e2 minor: make methods private instead of protected or documented as private but actually public 2009-08-21 11:03:56 -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
dcda70fddd don't send a getmore immediately after every query 2009-08-18 17:36:53 -04:00
Mike Dirolf
103224b800 add Cursor#count method 2009-08-18 11:26:58 -04:00
Mike Dirolf
1e4728a77f fix a deadlock with threaded queries 2009-08-10 16:10:52 -04:00
Mike Dirolf
91d6ab4caa rename collection 2009-08-04 14:16:02 -04:00
Mike Dirolf
db7cb56fc7 remove debugging cruft 2009-03-16 09:38:07 -04:00
Mike Dirolf
56fddf79d4 dbrefs only need an oid and a collection, not all this extra cruft... 2009-03-10 14:17:01 -04:00
Mike Dirolf
8b9bcb1e63 add back in logging and size checks around all socket receive's 2009-03-06 10:02:43 -05:00
Mike Dirolf
79b3df3c9e do all recv's in a loop. remove debugging cruft 2009-03-04 14:28:00 -05:00
Mike Dirolf
8b18502cd0 debug logs and assertions 2009-03-04 13:52:09 -05:00
Mike Dirolf
bdec973ff4 more debugging 2009-03-04 09:35:27 -05:00
Mike Dirolf
f907edcde5 more stuff to see on failure 2009-03-03 09:59:36 -05:00
Mike Dirolf
0d64ec9de1 temporarily raise a different exception 2009-03-03 09:27:38 -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
9a7ed4c3d3 comment 2009-02-09 13:13:13 -05:00
Jim Menard
8ecc8cb305 Remove debug warnings. 2009-02-05 15:59:44 -05:00
Jim Menard
04b0b926d4 comments 2009-02-03 12:43:09 -05:00
Jim Menard
b3bc2c41e2 Moved hint call from Cursor into Collection#find options and Query#initialize
parameter.
2009-01-29 07:15: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
b8e3a98755 check for nil 2009-01-15 09:35:44 -05:00
Jim Menard
fce980fc47 Fixed $hint and $explain support. 2009-01-14 10:42:56 -05:00
Jim Menard
b82dd30579 Accept more types for hints args. 2009-01-14 10:28:32 -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
97fa97bd2c Pass parent, name, and database to DBRef constructor when deserializing BSON 2009-01-09 15:22:10 -05:00
Jim Menard
fd6b0a2848 Raise an error if Cursor#to_a is called after Cursor#each but not also before. 2009-01-07 14:22:53 -05:00
Jim Menard
169a96ad5b Added Cursor#to_a and more tests and docs. 2009-01-07 14:07:17 -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
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
f961339cf5 Raise an error if cursor returns $err. 2008-12-09 14:47:34 -05:00
Jim Menard
5e3815bf69 first commit 2008-11-21 20:00:51 -05:00