6 #ifndef KNOWROB_MONGO_CURSOR_H
7 #define KNOWROB_MONGO_CURSOR_H
12 #include <knowrob/storage/mongo/Collection.h>
20 explicit Cursor(
const std::shared_ptr<Collection> &collection);
29 const auto &
id() {
return id_; };
53 void filter(
const bson_t *query_doc);
67 bool next(
const bson_t **doc,
bool ignore_empty =
false);
78 const auto *
query()
const {
return query_; }
81 std::shared_ptr<Collection> collection_;
82 mongoc_cursor_t *cursor_;
86 bool isAggregateQuery_;
void filter(const bson_t *query_doc)
void limit(unsigned int limit)
void descending(const char *key)
Cursor(const Cursor &)=delete
void ascending(const char *key)
Cursor(const std::shared_ptr< Collection > &collection)
const auto * query() const
bool next(const bson_t **doc, bool ignore_empty=false)
void limit(unsigned int limit)
void aggregate(const bson_t *query_doc)