1 #ifndef _ABSTRACT_ORDERED_INDEX_H_
2 #define _ABSTRACT_ORDERED_INDEX_H_
10 #include "../str_arena.h"
12 class abstract_ordered_index {
15 virtual ~abstract_ordered_index() {}
20 * Only an estimate, not transactional!
22 virtual size_t size() const = 0;
25 * Not thread safe for now
27 virtual std::map<std::string, uint64_t> clear() = 0;
29 // templated interface
31 // typedef [unspecified] key_type;
32 // typedef [unspecified] value_type;
34 // struct search_range_callback {
36 // virtual bool invoke(const key_type &, const value_type &);
39 // struct bytes_search_range_callback {
41 // virtual bool invoke(const std::string &, const std::string &);
44 //template <typename FieldsMask>
46 // /* [unspecified] */ &t, const key_type &k, value_type &v,
49 //template <typename FieldsMask>
50 //void search_range_call(
51 // /* [unspecified] */ &t, const key_type &lower, const key_type *upper,
52 // search_range_callback &callback,
53 // bool no_key_results, /* skip decoding of keys? */
56 //void bytes_search_range_call(
57 // /* [unspecified] */ &t, const key_type &lower, const key_type *upper,
58 // bytes_search_range_callback &callback,
59 // size_t value_fields_prefix);
61 //template <typename FieldsMask>
63 // /* [unspecified] */ &t, const key_type &k, const value_type &v,
66 //template <typename Traits>
68 // /* [unspecified] */ &t, const key_type &k, const value_type &v);
70 //template <typename Traits>
72 // /* [unspecified] */ &t, const key_type &k);
75 #endif /* _ABSTRACT_ORDERED_INDEX_H_ */