Line data Source code
1 : #pragma once
2 :
3 : #include <prefixdb/api/common_status.hpp>
4 : #include <prefixdb/api/fields.hpp>
5 : #include <memory>
6 : #include <string>
7 :
8 : namespace wamba { namespace prefixdb {
9 :
10 : namespace request
11 : {
12 0 : struct range
13 : {
14 : bool noval = false;
15 : std::string prefix;
16 : std::string from;
17 : std::string to;
18 : bool beg = true;
19 : size_t offset = 0;
20 : size_t limit = 10;
21 : size_t snapshot = 0;
22 : typedef std::unique_ptr<range> ptr;
23 : };
24 : }
25 :
26 : namespace response
27 : {
28 0 : struct range
29 : {
30 : bool fin = true;
31 : common_status status = common_status::OK ;
32 : std::string prefix;
33 : field_list_t fields;
34 :
35 : typedef std::unique_ptr<range> ptr;
36 : typedef std::function< void(ptr) > handler;
37 : };
38 : }
39 :
40 : }}
|