28
28
#include " VocBase/Methods/Collections.h"
29
29
30
30
namespace arangodb {
31
+ template <typename >
32
+ struct async ;
31
33
32
34
class LogicalCollection ;
33
35
34
- class RestCollectionHandler : public arangodb :: RestVocbaseBaseHandler {
36
+ class RestCollectionHandler : public RestVocbaseBaseHandler {
35
37
public:
36
38
RestCollectionHandler (ArangodServer&, GeneralRequest*, GeneralResponse*);
37
39
38
- char const * name () const override final { return " RestCollectionHandler" ; }
39
- RequestLane lane () const override final ;
40
+ char const * name () const final { return " RestCollectionHandler" ; }
41
+ RequestLane lane () const final ;
40
42
41
- RestStatus execute () override final ;
42
- void shutdownExecute (bool isFinalized) noexcept override final ;
43
+ futures::Future<futures::Unit> executeAsync () final ;
44
+ void shutdownExecute (bool isFinalized) noexcept final ;
43
45
44
46
protected:
45
47
enum class FiguresType { None = 0 , Standard = 1 , Detailed = 2 };
46
48
47
49
enum class CountType { None = 0 , Standard = 1 , Detailed = 2 };
48
50
49
- void collectionRepresentation (std::string const & name, bool showProperties,
50
- FiguresType showFigures, CountType showCount);
51
+ async<void > collectionRepresentation (std::string const & name,
52
+ bool showProperties,
53
+ FiguresType showFigures,
54
+ CountType showCount);
51
55
52
- void collectionRepresentation (std::shared_ptr<LogicalCollection> coll,
53
- bool showProperties, FiguresType showFigures,
54
- CountType showCount);
56
+
8000
async<void > collectionRepresentation (std::shared_ptr<LogicalCollection> coll,
57
+ bool showProperties,
58
+ FiguresType showFigures,
59
+ CountType showCount);
55
60
56
- void collectionRepresentation (methods::Collections::Context& ctxt,
57
- bool showProperties, FiguresType showFigures,
58
- CountType showCount);
59
-
60
- futures::Future<futures::Unit> collectionRepresentationAsync (
61
+ futures::Future<futures::Unit> collectionRepresentation (
61
62
methods::Collections::Context& ctxt, bool showProperties,
62
63
FiguresType showFigures, CountType showCount);
63
64
@@ -66,13 +67,13 @@ class RestCollectionHandler : public arangodb::RestVocbaseBaseHandler {
66
67
velocypack::Builder& builder) = 0;
67
68
68
69
private:
69
- RestStatus standardResponse ();
70
+ void standardResponse ();
70
71
futures::Future<futures::Unit> initializeTransaction (LogicalCollection&);
71
72
72
- futures::Future<RestStatus > handleCommandGet ();
73
- void handleCommandPost ();
74
- futures::Future<RestStatus > handleCommandPut ();
75
- void handleCommandDelete ();
73
+ async< void > handleCommandGet ();
74
+ async< void > handleCommandPost ();
75
+ async< void > handleCommandPut ();
76
+ async< void > handleCommandDelete ();
76
77
77
78
VPackBuilder _builder;
78
79
std::unique_ptr<transaction::Methods> _activeTrx;
0 commit comments