mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
support for date/datetime/timestamp types added for ppgen
This commit is contained in:
parent
49b9966542
commit
7fa7720c87
@ -29,9 +29,14 @@
|
||||
#ifndef _sqlpp__ppgen__colops__datetime_h
|
||||
#define _sqlpp__ppgen__colops__datetime_h
|
||||
|
||||
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_date \
|
||||
PROC_date
|
||||
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_date(...) \
|
||||
::sqlpp::day_point
|
||||
|
||||
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_datetime \
|
||||
PROC_datetime
|
||||
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_datetime(...) \
|
||||
[datetime is not implemented]
|
||||
::sqlpp::time_point
|
||||
|
||||
#endif // _sqlpp__ppgen__colops__datetime_h
|
||||
|
@ -32,6 +32,6 @@
|
||||
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_timestamp \
|
||||
PROC_timestamp
|
||||
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_timestamp(...) \
|
||||
[timestamp is not implemented]
|
||||
::sqlpp::time_point
|
||||
|
||||
#endif // _sqlpp__ppgen__colops__timestamp_h
|
||||
|
@ -60,6 +60,9 @@ SQLPP_DECLARE_TABLE(
|
||||
(id , int , SQLPP_PRIMARY_KEY)
|
||||
(name , varchar(255), SQLPP_NULL )
|
||||
(fatal, bool , SQLPP_NOT_NULL )
|
||||
(date0, date , SQLPP_NULL )
|
||||
(date1, datetime , SQLPP_NULL )
|
||||
(date2, timestamp , SQLPP_NULL )
|
||||
)
|
||||
// clang-format on
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user