mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Adjust sample.sql and ddl2cpp to match Sample.h
This commit is contained in:
parent
5b2b175b21
commit
268c176d8a
@ -273,6 +273,7 @@ types = {
|
||||
'numeric': 'floating_point', # PostgreSQL
|
||||
'date': 'day_point',
|
||||
'datetime': 'time_point',
|
||||
'time': 'time_of_day',
|
||||
'time without time zone': 'time_point', # PostgreSQL
|
||||
'time with time zone': 'time_point', # PostgreSQL
|
||||
'timestamp': 'time_point',
|
||||
|
@ -256,7 +256,6 @@ namespace test
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
namespace TabDateTime_
|
||||
{
|
||||
struct ColDayPoint
|
||||
@ -303,7 +302,6 @@ namespace test
|
||||
};
|
||||
using _traits = sqlpp::make_traits<sqlpp::time_point, sqlpp::tag::can_be_null>;
|
||||
};
|
||||
|
||||
struct ColTimeOfDay
|
||||
{
|
||||
struct _alias_t
|
||||
@ -333,7 +331,7 @@ namespace test
|
||||
{
|
||||
struct _alias_t
|
||||
{
|
||||
static constexpr const char _literal[] = "tab_time_point";
|
||||
static constexpr const char _literal[] = "tab_date_time";
|
||||
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
||||
template <typename T>
|
||||
struct _member_t
|
||||
|
@ -26,10 +26,11 @@
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tab_foo
|
||||
(
|
||||
delta varchar(255),
|
||||
delta varchar(255) NOT NULL DEFAULT "",
|
||||
epsilon bigint,
|
||||
omega double,
|
||||
psi bigint UNSIGNED
|
||||
psi bigint UNSIGNED,
|
||||
book BLOB
|
||||
);
|
||||
|
||||
CREATE TABLE tab_bar
|
||||
@ -40,3 +41,10 @@ CREATE TABLE tab_bar
|
||||
delta int
|
||||
);
|
||||
|
||||
CREATE TABLE tab_date_time
|
||||
(
|
||||
col_day_point date,
|
||||
col_time_point datetime,
|
||||
col_time_of_day time
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user