summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2009-03-24 14:19:03 -0400
committerDwight <dmerriman@gmail.com>2009-03-24 14:19:03 -0400
commitdb14f056f902f9bc7690cda01b80003046439250 (patch)
treebdfc3acfc615beeb2db254b7cc93898a25ac69d3 /db
parent2724428604a23c1add69ff64c20ecb2e32167a59 (diff)
downloadmongo-db14f056f902f9bc7690cda01b80003046439250.tar.gz
comments/cleanup
Diffstat (limited to 'db')
-rw-r--r--db/clientcursor.cpp2
-rw-r--r--db/clientcursor.h14
2 files changed, 6 insertions, 10 deletions
diff --git a/db/clientcursor.cpp b/db/clientcursor.cpp
index cc7f3aea190..5abb24ff552 100644
--- a/db/clientcursor.cpp
+++ b/db/clientcursor.cpp
@@ -31,8 +31,6 @@
namespace mongo {
- /* TODO: FIX cleanup of clientCursors when hit the end. (ntoreturn insufficient) */
-
CCById clientCursorsById;
/* ------------------------------------------- */
diff --git a/db/clientcursor.h b/db/clientcursor.h
index 8a48fa36a38..531c16e4280 100644
--- a/db/clientcursor.h
+++ b/db/clientcursor.h
@@ -1,3 +1,5 @@
+/* clientcursor.h */
+
/**
* Copyright (C) 2008 10gen Inc.
*
@@ -14,9 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* clientcursor.h
-
- Cursor -- and its derived classes -- are our internal cursors.
+/* Cursor -- and its derived classes -- are our internal cursors.
ClientCursor is a wrapper that represents a cursorid from our database
application's perspective.
@@ -28,14 +28,13 @@
namespace mongo {
- typedef long long CursorId;
- class Cursor;
+ typedef long long CursorId; /* passed to the client so it can send back on getMore */
+ class Cursor; /* internal server cursor base class */
class ClientCursor;
typedef map<CursorId, ClientCursor*> CCById;
extern CCById clientCursorsById;
class ClientCursor {
- friend class CursInspector;
DiskLoc _lastLoc; // use getter and setter not this.
static CursorId allocCursorId();
public:
@@ -45,10 +44,9 @@ namespace mongo {
~ClientCursor();
const CursorId cursorid;
string ns;
- //BSONObj pattern; // the query object
auto_ptr<KeyValJSMatcher> matcher;
auto_ptr<Cursor> c;
- int pos;
+ int pos; /* # objects into the cursor so far */
DiskLoc lastLoc() const {
return _lastLoc;
}