#pragma once #include "storage/indexes/index_base.hpp" #include "storage/indexes/index_record.hpp" #include "data_structures/concurrent/concurrent_list.hpp" template class NonUniqueUnorderedIndex : public IndexBase { public: typedef T value_type; typedef K key_type; NonUniqueUnorderedIndex(); // Insert's value. // nonunique => always succeds. bool insert(IndexRecord &&value) final; // Returns iterator which returns valid records in range. // ordered==None => doesn't guarantee any order of submitting records. std::unique_ptr> for_range(DbAccessor &t, Border from = Border(), Border to = Border()) final; // Same as for_range just whit known returned iterator. auto for_range_exact(DbAccessor &t, Border from = Border(), Border to = Border()); // Removes for all transactions obsolete Records. // Cleaner has to call this method when he decideds that it is time for // cleaning. void clean(DbTransaction &) final; private: List> list; };