date and boolean data types added
This commit is contained in:
11
table.h
11
table.h
@@ -10,7 +10,7 @@ namespace usql {
|
||||
struct Table {
|
||||
|
||||
Table(const Table &other);
|
||||
Table(const std::string name, const std::vector<ColDefNode> columns);
|
||||
Table(const std::string& name, const std::vector<ColDefNode>& columns);
|
||||
|
||||
ColDefNode get_column_def(const std::string &col_name);
|
||||
ColDefNode get_column_def(int col_index);
|
||||
@@ -18,12 +18,12 @@ namespace usql {
|
||||
int columns_count() const { return m_col_defs.size(); };
|
||||
int rows_count() const { return m_rows.size(); };
|
||||
|
||||
Row create_empty_row(); // TODO this means unnecessary copying
|
||||
Row create_empty_row() const; // TODO this means unnecessary copying
|
||||
void add_row(const Row &row);
|
||||
void add_copy_of_row(const Row &row);
|
||||
|
||||
void validate_column(const ColDefNode *col_def, ValueNode *col_val);
|
||||
void validate_column(const ColDefNode *col_def, ColValue *col_val);
|
||||
static void validate_column(const ColDefNode *col_def, ValueNode *col_val);
|
||||
static void validate_column(const ColDefNode *col_def, ColValue *col_val);
|
||||
void validate_row(const Row &row);
|
||||
|
||||
std::string csv_string();
|
||||
@@ -34,6 +34,9 @@ namespace usql {
|
||||
std::string m_name;
|
||||
std::vector<ColDefNode> m_col_defs;
|
||||
std::vector<Row> m_rows;
|
||||
|
||||
static long string_to_long(const std::string &s) ;
|
||||
static double string_to_double(const std::string &s) ;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user