small refactorings

This commit is contained in:
2021-12-19 16:31:54 +01:00
parent 2a138d0c81
commit 498d1f17aa
7 changed files with 41 additions and 39 deletions

View File

@@ -36,8 +36,8 @@ struct Table {
void print();
std::string m_name;
std::vector<ColDefNode> m_col_defs;
std::string m_name;
std::vector<ColDefNode> m_col_defs;
std::vector<Row> m_rows;
std::vector<Index> m_indexes;
@@ -59,7 +59,7 @@ struct Table {
Index * get_index(const std::string &index_name);
Index * get_index_for_column(const std::string &col_name);
bool empty();
bool empty() const;
struct rows_scanner {
explicit rows_scanner(Table *tbl) : m_use_rowids(false), m_table(tbl), m_fscan_itr(tbl->m_rows.begin()) {}
@@ -72,7 +72,7 @@ struct Table {
Table * m_table;
std::vector<Row>::iterator m_fscan_itr;
std::vector<rowid_t> m_rowids;
size_t m_rowids_idx{};
size_t m_rowids_idx{};
};
};