faster csv loading
This commit is contained in:
6
row.h
6
row.h
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user