blob: 089ced5f05814bb3a8abf98405ec8c64da0e45ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "mysqlBindings.h"
namespace MyGrate::Input {
MYSQL_TIME &
operator<<(MYSQL_TIME & t, const Date & dt)
{
t.year = dt.year;
t.month = dt.month;
t.day = dt.day;
return t;
}
MYSQL_TIME &
operator<<(MYSQL_TIME & t, const Time & dt)
{
t.hour = dt.hour;
t.minute = dt.minute;
t.second = dt.second;
return t;
}
MYSQL_TIME &
operator<<(MYSQL_TIME & t, const DateTime & dt)
{
return t << static_cast<Date>(dt) << static_cast<Time>(dt);
}
}
|