small refactorings
This commit is contained in:
15
row.cpp
15
row.cpp
@@ -56,24 +56,19 @@ Row::Row(const Row &other) {
|
||||
ColumnType col_type = other.m_columns[i]->getColType();
|
||||
switch (col_type) {
|
||||
case ColumnType::integer_type :
|
||||
setIntColumnValue(i,
|
||||
(static_cast<ColIntegerValue *>(other.m_columns[i].get())->getIntValue()));
|
||||
setIntColumnValue(i, (static_cast<ColIntegerValue *>(other.m_columns[i].get())->getIntValue()));
|
||||
break;
|
||||
case ColumnType::float_type :
|
||||
setFloatColumnValue(i,
|
||||
(static_cast<ColDoubleValue *>(other.m_columns[i].get())->getDoubleValue()));
|
||||
setFloatColumnValue(i, (static_cast<ColDoubleValue *>(other.m_columns[i].get())->getDoubleValue()));
|
||||
break;
|
||||
case ColumnType::varchar_type :
|
||||
setStringColumnValue(i,
|
||||
(static_cast<ColStringValue *>(other.m_columns[i].get())->getStringValue()));
|
||||
setStringColumnValue(i, (static_cast<ColStringValue *>(other.m_columns[i].get())->getStringValue()));
|
||||
break;
|
||||
case ColumnType::date_type :
|
||||
setDateColumnValue(i,
|
||||
(static_cast<ColDateValue *>(other.m_columns[i].get())->getDateValue()));
|
||||
setDateColumnValue(i, (static_cast<ColDateValue *>(other.m_columns[i].get())->getDateValue()));
|
||||
break;
|
||||
case ColumnType::bool_type :
|
||||
setBoolColumnValue(i,
|
||||
(static_cast<ColBooleanValue *>(other.m_columns[i].get())->getBoolValue()));
|
||||
setBoolColumnValue(i, (static_cast<ColBooleanValue *>(other.m_columns[i].get())->getBoolValue()));
|
||||
break;
|
||||
default:
|
||||
throw Exception("unsupported column type");
|
||||
|
||||
Reference in New Issue
Block a user