diff options
author | James Wahlin <james.wahlin@10gen.com> | 2016-07-25 16:56:22 -0400 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2016-07-29 15:36:53 -0400 |
commit | dc7f50c520c5129709008568241274cb6d5ec231 (patch) | |
tree | cd38158bf08d17566e706eeb3eb4202d3dfc1044 /src/mongo/s/query/cluster_client_cursor.h | |
parent | d305e618162d37ccc16cf574fcc0388a1160af93 (diff) | |
download | mongo-dc7f50c520c5129709008568241274cb6d5ec231.tar.gz |
SERVER-24762 Support for views on sharded collections
Diffstat (limited to 'src/mongo/s/query/cluster_client_cursor.h')
-rw-r--r-- | src/mongo/s/query/cluster_client_cursor.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/s/query/cluster_client_cursor.h b/src/mongo/s/query/cluster_client_cursor.h index 47f4e46f89a..c4bb1c9373e 100644 --- a/src/mongo/s/query/cluster_client_cursor.h +++ b/src/mongo/s/query/cluster_client_cursor.h @@ -31,6 +31,7 @@ #include <boost/optional.hpp> #include "mongo/db/jsobj.h" +#include "mongo/s/query/cluster_query_result.h" #include "mongo/util/time_support.h" namespace mongo { @@ -58,12 +59,12 @@ public: * Returns the next available result document (along with an ok status). May block waiting * for results from remote nodes. * - * If there are no further results, the end of the stream is indicated with boost::none and - * an ok status. + * If there are no further results, the end of the stream is indicated with an empty + * QueryResult and an ok status. * * A non-ok status is returned in case of any error. */ - virtual StatusWith<boost::optional<BSONObj>> next() = 0; + virtual StatusWith<ClusterQueryResult> next() = 0; /** * Must be called before destruction to abandon a not-yet-exhausted cursor. If next() has @@ -84,14 +85,15 @@ public: virtual long long getNumReturnedSoFar() const = 0; /** - * Stash the BSONObj so that it gets returned from the CCC on a later call to next(). + * Stash the ClusterQueryResult so that it gets returned from the CCC on a later call to + * next(). * * Queued documents are returned in FIFO order. The queued results are exhausted before * generating further results from the underlying mongos query stages. * * 'obj' must be owned BSON. */ - virtual void queueResult(const BSONObj& obj) = 0; + virtual void queueResult(const ClusterQueryResult& result) = 0; /** * Returns whether or not all the remote cursors underlying this cursor have been exhausted. |