faster csv loading

This commit is contained in:
2021-08-23 18:18:03 +02:00
parent a454e215eb
commit be89b55b17
5 changed files with 37 additions and 22 deletions

6
row.h
View File

@@ -127,7 +127,7 @@ namespace usql {
class Row {
public:
explicit Row(int cols_count) : m_columns(cols_count, ColNullValue()) {};
explicit Row(int cols_count) : m_columns(cols_count) {};
Row(const Row &other);
Row &operator=(Row other);
@@ -145,7 +145,7 @@ namespace usql {
void setColumnValue(ColDefNode *col_def, ValueNode *col_value);
ColValue &operator[](int i) const {
auto type_index = m_columns[i].index();
auto type_index = m_columns[i].index();
switch (type_index) {
case 0:
return (ColValue &) *std::get_if<ColNullValue>(&m_columns[i]);
@@ -160,7 +160,7 @@ namespace usql {
case 5:
return (ColValue &) *std::get_if<ColBooleanValue>(&m_columns[i]);
}
throw Exception("should not happen");
throw Exception("should not happen");
}
int compare(const Row &other) const;