Merge remote-tracking branch 'origin/main'

# Conflicts:
#	demo/main.cpp
This commit is contained in:
Sascha Kühl
2024-08-21 15:36:34 +02:00
4 changed files with 30 additions and 21 deletions
+6 -5
View File
@@ -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;