fixed record class
This commit is contained in:
@@ -15,8 +15,9 @@ struct column;
|
||||
class record
|
||||
{
|
||||
private:
|
||||
using field_by_index = std::vector<field>;
|
||||
using field_index_pair = std::pair<std::reference_wrapper<field>, field_by_index::difference_type>;
|
||||
using field_ref = std::reference_wrapper<field>;
|
||||
using field_by_index = std::vector<field_ref>;
|
||||
using field_index_pair = std::pair<field, field_by_index::difference_type>;
|
||||
using field_by_name_map = std::unordered_map<std::string, field_index_pair>;
|
||||
|
||||
public:
|
||||
@@ -36,13 +37,13 @@ public:
|
||||
void process(Operator &op)
|
||||
{
|
||||
for(auto &f : fields_) {
|
||||
f.process(op);
|
||||
f.get().process(op);
|
||||
}
|
||||
}
|
||||
|
||||
void append(field col);
|
||||
void append(const field &col);
|
||||
|
||||
[[nodiscard]] const std::vector<field>& columns() const;
|
||||
[[nodiscard]] const std::vector<field_ref>& columns() const;
|
||||
|
||||
[[nodiscard]] const field& at(const column &col) const;
|
||||
[[nodiscard]] const field& at(size_t index) const;
|
||||
|
||||
Reference in New Issue
Block a user