small refactorings

This commit is contained in:
2021-08-15 13:24:16 +02:00
parent b37b0b55ff
commit b03462da6a
8 changed files with 55 additions and 89 deletions

12
row.h
View File

@@ -38,7 +38,7 @@ namespace usql {
struct ColIntegerValue : ColValue {
ColIntegerValue(long value) : m_integer(value) {};
explicit ColIntegerValue(long value) : m_integer(value) {};
ColIntegerValue(const ColIntegerValue &other) : m_integer(other.m_integer) {};
ColumnType getColType() override { return ColumnType::integer_type; };
@@ -55,7 +55,7 @@ namespace usql {
struct ColDoubleValue : ColValue {
ColDoubleValue(double value) : m_double(value) {};
explicit ColDoubleValue(double value) : m_double(value) {};
ColDoubleValue(const ColDoubleValue &other) : m_double(other.m_double) {}
ColumnType getColType() override { return ColumnType::float_type; };
@@ -72,7 +72,7 @@ namespace usql {
struct ColStringValue : ColValue {
ColStringValue(const std::string &value) : m_string(value) {};
explicit ColStringValue(const std::string &value) : m_string(value) {};
ColStringValue(const ColStringValue &other) : m_string(other.m_string) {};
ColumnType getColType() override { return ColumnType::varchar_type; };
@@ -88,7 +88,7 @@ namespace usql {
};
struct ColDateValue : ColValue {
ColDateValue(long value) : m_date(value) {};
explicit ColDateValue(long value) : m_date(value) {};
ColDateValue(const ColDateValue &other) : m_date(other.m_date) {};
ColumnType getColType() override { return ColumnType::date_type; };
@@ -104,7 +104,7 @@ namespace usql {
};
struct ColBooleanValue : ColValue {
ColBooleanValue(bool value) : m_bool(value) {};
explicit ColBooleanValue(bool value) : m_bool(value) {};
ColBooleanValue(const ColBooleanValue &other) : m_bool(other.m_bool) {};
ColumnType getColType() override { return ColumnType::bool_type; };
@@ -122,7 +122,7 @@ namespace usql {
class Row {
public:
Row(int cols_count);
explicit Row(int cols_count);
Row(const Row &other);
Row &operator=(Row other);