Scorum
db_accessor_helpers.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <boost/optional/optional.hpp>
3 #include <boost/multi_index/ordered_index.hpp>
4 #include <chainbase/generic_index.hpp>
5 
6 namespace scorum {
7 namespace chain {
8 namespace dba {
10 {
11 };
13 {
14 };
15 enum no_key
16 {
17 };
18 
21 
22 template <typename TObject, typename TIndexBy>
24  typename boost::multi_index::index<typename chainbase::get_index_type<TObject>::type, TIndexBy>::type::key_type;
25 
26 namespace detail {
27 enum class bound_kind
28 {
29  lt,
30  le,
31  gt,
32  ge,
33  unbounded
34 };
35 
36 template <typename T> struct bound
37 {
38  boost::optional<const T&> value;
40 
42  : value(value)
43  , kind(kind)
44  {
45  }
46 
49  {
50  }
51 };
52 }
53 
54 template <typename TValue> auto operator<(const param_placeholder&, const TValue& val)
55 {
57 }
58 
59 template <typename TValue> auto operator>(const TValue& val, const param_placeholder&)
60 {
62 }
63 
64 template <typename TValue> auto operator<=(const param_placeholder&, const TValue& val)
65 {
67 }
68 
69 template <typename TValue> auto operator>=(const TValue& val, const param_placeholder&)
70 {
72 }
73 
74 template <typename TValue> auto operator>(const param_placeholder&, const TValue& val)
75 {
77 }
78 
79 template <typename TValue> auto operator<(const TValue& val, const param_placeholder&)
80 {
82 }
83 
84 template <typename TValue> auto operator>=(const param_placeholder&, const TValue& val)
85 {
87 }
88 
89 template <typename TValue> auto operator<=(const TValue& val, const param_placeholder&)
90 {
92 }
93 }
94 }
95 }
auto operator<(const param_placeholder &, const TValue &val)
auto operator<=(const param_placeholder &, const TValue &val)
auto operator>(const TValue &val, const param_placeholder &)
typename boost::multi_index::index< typename chainbase::get_index_type< TObject >::type, TIndexBy >::type::key_type index_key_type
auto operator>=(const TValue &val, const param_placeholder &)
const param_placeholder _x
const unbounded_placeholder unbounded
Definition: asset.cpp:15
boost::optional< const T & > value
bound(const T &value, bound_kind kind)