summaryrefslogtreecommitdiff
path: root/db/clientcursor.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-06-24 15:51:13 -0400
committerEliot Horowitz <eliot@10gen.com>2011-06-24 16:07:13 -0400
commit5696b25f0a47f17615adbfab25b48371916ded1c (patch)
tree2167015a8ba197f4428db8ae57a61641cd7e23fc /db/clientcursor.h
parent72a7bc38676780e398321aaeb1e2f537d48b457c (diff)
downloadmongo-5696b25f0a47f17615adbfab25b48371916ded1c.tar.gz
ClientCursor::extractKeys
Diffstat (limited to 'db/clientcursor.h')
-rw-r--r--db/clientcursor.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/db/clientcursor.h b/db/clientcursor.h
index 4682e318bdc..2e4b0ec5703 100644
--- a/db/clientcursor.h
+++ b/db/clientcursor.h
@@ -256,8 +256,16 @@ namespace mongo {
* if it can be retrieved from key, it is
* @return if this was retrieved from key
*/
- BSONElement getFieldDotted( const string& name , bool * fromKey = 0 );
-
+ BSONElement getFieldDotted( const string& name , bool * fromKey = 0 ) ;
+
+ /** extract items from object which match a pattern object.
+ * e.g., if pattern is { x : 1, y : 1 }, builds an object with
+ * x and y elements of this object, if they are present.
+ * returns elements with original field names
+ * NOTE: copied from BSONObj::extractFields
+ */
+ BSONObj extractFields(const BSONObj &pattern , bool fillWithNull = false) ;
+
bool currentIsDup() { return _c->getsetdup( _c->currLoc() ); }
bool currentMatches() {