NebulaGraph CPP Client  release-3.8
ScanEdgeIter.h
1 /* Copyright (c) 2020 vesoft inc. All rights reserved.
2  *
3  * This source code is licensed under Apache 2.0 License.
4  */
5 
6 #pragma once
7 
8 #include <string>
9 #include <vector>
10 
11 #include "common/datatypes/DataSet.h"
12 #include "common/graph/Response.h"
13 
14 namespace nebula {
15 class StorageClient;
16 
17 namespace storage {
18 namespace cpp2 {
19 class ScanEdgeRequest;
20 } // namespace cpp2
21 } // namespace storage
22 
23 struct ScanEdgeIter {
24  ScanEdgeIter(StorageClient* client, storage::cpp2::ScanEdgeRequest* req, bool hasNext = true);
25 
26  ~ScanEdgeIter();
27 
28  bool hasNext();
29 
30  std::pair<::nebula::ErrorCode, DataSet> next();
31 
32  StorageClient* client_;
33  storage::cpp2::ScanEdgeRequest* req_;
34  bool hasNext_;
35  std::string nextCursor_;
36 };
37 
38 } // namespace nebula