changes here and there

This commit is contained in:
2021-07-12 18:45:51 +02:00
parent 5e69ce1047
commit 5e4480c767
18 changed files with 1692 additions and 1309 deletions

31
table.h
View File

@@ -5,25 +5,26 @@
#include <vector>
// TODO make it a class
struct Table {
namespace usql {
// public:
Table(const Table& other);
struct Table {
Table(const std::string name, const std::vector<ColDefNode> columns);
Table(const Table &other);
ColDefNode get_column_def(const std::string& col_name);
int columns_count() { return m_col_defs.size(); };
Table(const std::string name, const std::vector<ColDefNode> columns);
Row createEmptyRow(); // TODO this means unnecessary copying
void addRow(const Row &row);
ColDefNode get_column_def(const std::string &col_name);
void print();
int columns_count() { return m_col_defs.size(); };
Row createEmptyRow(); // TODO this means unnecessary copying
void addRow(const Row &row);
// private:
std::string m_name;
std::vector<ColDefNode> m_col_defs;
std::vector<Row> m_rows;
};
void print();
std::string m_name;
std::vector<ColDefNode> m_col_defs;
std::vector<Row> m_rows;
};
}