mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
mysqlxx: fixed error.
This commit is contained in:
parent
f024849061
commit
1a5b3c0473
@ -73,6 +73,20 @@ public:
|
||||
init(time(0));
|
||||
}
|
||||
|
||||
Date(const Date & x)
|
||||
{
|
||||
operator=(x);
|
||||
}
|
||||
|
||||
Date & operator= (const Date & x)
|
||||
{
|
||||
m_year = x.m_year;
|
||||
m_month = x.m_month;
|
||||
m_day = x.m_day;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Date & operator= (time_t time)
|
||||
{
|
||||
init(time);
|
||||
|
@ -73,13 +73,7 @@ public:
|
||||
if (s.size() < 19)
|
||||
throw Exception("Cannot parse DateTime: " + s);
|
||||
|
||||
m_year = s[0] * 1000 + s[1] * 100 + s[2] * 10 + s[3];
|
||||
m_month = s[5] * 10 + s[6];
|
||||
m_day = s[8] * 10 + s[9];
|
||||
|
||||
m_hour = s[11] * 10 + s[12];
|
||||
m_minute = s[14] * 10 + s[15];
|
||||
m_second = s[17] * 10 + s[18];
|
||||
init(s.data(), s.size());
|
||||
}
|
||||
|
||||
DateTime()
|
||||
@ -92,6 +86,23 @@ public:
|
||||
init(data, length);
|
||||
}
|
||||
|
||||
DateTime(const DateTime & x)
|
||||
{
|
||||
operator=(x);
|
||||
}
|
||||
|
||||
DateTime & operator= (const DateTime & x)
|
||||
{
|
||||
m_year = x.m_year;
|
||||
m_month = x.m_month;
|
||||
m_day = x.m_day;
|
||||
m_hour = x.m_hour;
|
||||
m_minute = x.m_minute;
|
||||
m_second = x.m_second;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
DateTime & operator= (time_t time)
|
||||
{
|
||||
init(time);
|
||||
|
Loading…
Reference in New Issue
Block a user