2023-07-25 13:00:05 +08:00
|
|
|
#pragma once
|
2014-07-20 17:14:44 +08:00
|
|
|
|
|
|
|
#include <sqlpp11/table.h>
|
2015-10-30 05:21:46 +08:00
|
|
|
#include <sqlpp11/data_types.h>
|
2014-12-01 02:40:34 +08:00
|
|
|
#include <sqlpp11/char_sequence.h>
|
2014-07-20 17:14:44 +08:00
|
|
|
|
|
|
|
namespace test
|
|
|
|
{
|
|
|
|
namespace TabFoo_
|
|
|
|
{
|
|
|
|
struct Delta
|
|
|
|
{
|
2014-12-01 02:40:34 +08:00
|
|
|
struct _alias_t
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
static constexpr const char _literal[] = "delta";
|
2014-12-01 02:40:34 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
2015-09-14 03:33:19 +08:00
|
|
|
template <typename T>
|
2014-07-20 17:14:44 +08:00
|
|
|
struct _member_t
|
2015-09-14 03:33:19 +08:00
|
|
|
{
|
|
|
|
T delta;
|
|
|
|
T& operator()()
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
return delta;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return delta;
|
|
|
|
}
|
|
|
|
};
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
2016-03-11 16:25:36 +08:00
|
|
|
using _traits = sqlpp::make_traits<sqlpp::varchar>;
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
|
|
|
struct Epsilon
|
|
|
|
{
|
2014-12-01 02:40:34 +08:00
|
|
|
struct _alias_t
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
static constexpr const char _literal[] = "epsilon";
|
2014-12-01 02:40:34 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
2015-09-14 03:33:19 +08:00
|
|
|
template <typename T>
|
2014-07-20 17:14:44 +08:00
|
|
|
struct _member_t
|
2015-09-14 03:33:19 +08:00
|
|
|
{
|
|
|
|
T epsilon;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return epsilon;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
return epsilon;
|
|
|
|
}
|
|
|
|
};
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
2014-07-24 00:06:33 +08:00
|
|
|
using _traits = sqlpp::make_traits<sqlpp::bigint, sqlpp::tag::can_be_null>;
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
|
|
|
struct Omega
|
|
|
|
{
|
2014-12-01 02:40:34 +08:00
|
|
|
struct _alias_t
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
static constexpr const char _literal[] = "omega";
|
2014-12-01 02:40:34 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
2015-09-14 03:33:19 +08:00
|
|
|
template <typename T>
|
2014-07-20 17:14:44 +08:00
|
|
|
struct _member_t
|
2015-09-14 03:33:19 +08:00
|
|
|
{
|
|
|
|
T omega;
|
|
|
|
T& operator()()
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
return omega;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return omega;
|
|
|
|
}
|
|
|
|
};
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
2014-07-24 00:06:33 +08:00
|
|
|
using _traits = sqlpp::make_traits<sqlpp::floating_point, sqlpp::tag::can_be_null>;
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
2016-05-20 19:09:48 +08:00
|
|
|
struct Psi
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "psi";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T psi;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return psi;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return psi;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::bigint_unsigned, sqlpp::tag::can_be_null>;
|
2016-06-06 03:35:49 +08:00
|
|
|
};
|
2017-08-07 01:54:54 +08:00
|
|
|
struct Book
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "book";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T book;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return book;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return book;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::blob, sqlpp::tag::can_be_null>;
|
|
|
|
};
|
2018-06-01 15:53:39 +08:00
|
|
|
} // namespace TabFoo_
|
2014-07-20 17:14:44 +08:00
|
|
|
|
2017-08-07 01:54:54 +08:00
|
|
|
struct TabFoo : sqlpp::table_t<TabFoo, TabFoo_::Delta, TabFoo_::Epsilon, TabFoo_::Omega, TabFoo_::Psi, TabFoo_::Book>
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2014-12-01 02:40:34 +08:00
|
|
|
struct _alias_t
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
static constexpr const char _literal[] = "tab_foo";
|
2014-12-01 02:40:34 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
2015-09-14 03:33:19 +08:00
|
|
|
template <typename T>
|
2014-07-20 17:14:44 +08:00
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T tabFoo;
|
2015-09-14 03:33:19 +08:00
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return tabFoo;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return tabFoo;
|
|
|
|
}
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
namespace TabBar_
|
|
|
|
{
|
|
|
|
struct Alpha
|
|
|
|
{
|
2014-12-01 02:40:34 +08:00
|
|
|
struct _alias_t
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
static constexpr const char _literal[] = "alpha";
|
2014-12-01 02:40:34 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
2015-09-14 03:33:19 +08:00
|
|
|
template <typename T>
|
2014-07-20 17:14:44 +08:00
|
|
|
struct _member_t
|
2015-09-14 03:33:19 +08:00
|
|
|
{
|
|
|
|
T alpha;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return alpha;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
return alpha;
|
|
|
|
}
|
|
|
|
};
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
2015-09-14 03:33:19 +08:00
|
|
|
using _traits = sqlpp::
|
|
|
|
make_traits<sqlpp::bigint, sqlpp::tag::must_not_insert, sqlpp::tag::must_not_update, sqlpp::tag::can_be_null>;
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
|
|
|
struct Beta
|
|
|
|
{
|
2014-12-01 02:40:34 +08:00
|
|
|
struct _alias_t
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
static constexpr const char _literal[] = "beta";
|
2014-12-01 02:40:34 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
2015-09-14 03:33:19 +08:00
|
|
|
template <typename T>
|
2014-07-20 17:14:44 +08:00
|
|
|
struct _member_t
|
2015-09-14 03:33:19 +08:00
|
|
|
{
|
|
|
|
T beta;
|
|
|
|
T& operator()()
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
return beta;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return beta;
|
|
|
|
}
|
|
|
|
};
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
2014-07-24 00:06:33 +08:00
|
|
|
using _traits = sqlpp::make_traits<sqlpp::varchar, sqlpp::tag::can_be_null>;
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
|
|
|
struct Gamma
|
|
|
|
{
|
2014-12-01 02:40:34 +08:00
|
|
|
struct _alias_t
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
static constexpr const char _literal[] = "gamma";
|
2014-12-01 02:40:34 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
2015-09-14 03:33:19 +08:00
|
|
|
template <typename T>
|
2014-07-20 17:14:44 +08:00
|
|
|
struct _member_t
|
2015-09-14 03:33:19 +08:00
|
|
|
{
|
|
|
|
T gamma;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return gamma;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
return gamma;
|
|
|
|
}
|
|
|
|
};
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
2014-07-24 00:06:33 +08:00
|
|
|
using _traits = sqlpp::make_traits<sqlpp::boolean, sqlpp::tag::require_insert>;
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
|
|
|
struct Delta
|
|
|
|
{
|
2014-12-01 02:40:34 +08:00
|
|
|
struct _alias_t
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
static constexpr const char _literal[] = "delta";
|
2014-12-01 02:40:34 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
2015-09-14 03:33:19 +08:00
|
|
|
template <typename T>
|
2014-07-20 17:14:44 +08:00
|
|
|
struct _member_t
|
2015-09-14 03:33:19 +08:00
|
|
|
{
|
|
|
|
T delta;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return delta;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
return delta;
|
|
|
|
}
|
|
|
|
};
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
2014-07-24 00:06:33 +08:00
|
|
|
using _traits = sqlpp::make_traits<sqlpp::integer, sqlpp::tag::can_be_null>;
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
2018-06-01 15:53:39 +08:00
|
|
|
} // namespace TabBar_
|
2014-07-20 17:14:44 +08:00
|
|
|
|
2015-09-14 03:33:19 +08:00
|
|
|
struct TabBar : sqlpp::table_t<TabBar, TabBar_::Alpha, TabBar_::Beta, TabBar_::Gamma, TabBar_::Delta>
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2014-12-01 02:40:34 +08:00
|
|
|
struct _alias_t
|
2014-07-20 17:14:44 +08:00
|
|
|
{
|
2015-09-14 03:33:19 +08:00
|
|
|
static constexpr const char _literal[] = "tab_bar";
|
2014-12-01 02:40:34 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
2015-09-14 03:33:19 +08:00
|
|
|
template <typename T>
|
2014-07-20 17:14:44 +08:00
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T tabBar;
|
2015-09-14 03:33:19 +08:00
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return tabBar;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return tabBar;
|
|
|
|
}
|
2014-07-20 17:14:44 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2015-10-29 03:52:43 +08:00
|
|
|
namespace TabDateTime_
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
struct ColDayPoint
|
2015-10-29 03:52:43 +08:00
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
static constexpr const char _literal[] = "col_day_point";
|
2015-10-29 03:52:43 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
T colDayPoint;
|
2015-10-29 03:52:43 +08:00
|
|
|
T& operator()()
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return colDayPoint;
|
2015-10-29 03:52:43 +08:00
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return colDayPoint;
|
2015-10-29 03:52:43 +08:00
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
2015-10-29 23:41:45 +08:00
|
|
|
using _traits = sqlpp::make_traits<sqlpp::day_point, sqlpp::tag::can_be_null>;
|
2015-10-29 03:52:43 +08:00
|
|
|
};
|
2015-10-29 23:41:45 +08:00
|
|
|
struct ColTimePoint
|
2015-10-29 03:52:43 +08:00
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
static constexpr const char _literal[] = "col_time_point";
|
2015-10-29 03:52:43 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
T colTimePoint;
|
2015-10-29 03:52:43 +08:00
|
|
|
T& operator()()
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return colTimePoint;
|
2015-10-29 03:52:43 +08:00
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return colTimePoint;
|
2015-10-29 03:52:43 +08:00
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
2015-10-29 23:41:45 +08:00
|
|
|
using _traits = sqlpp::make_traits<sqlpp::time_point, sqlpp::tag::can_be_null>;
|
2015-10-29 03:52:43 +08:00
|
|
|
};
|
2016-05-19 20:53:56 +08:00
|
|
|
struct ColTimeOfDay
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "col_time_of_day";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T colTimeOfDay;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return colTimeOfDay;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return colTimeOfDay;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::time_of_day, sqlpp::tag::can_be_null>;
|
|
|
|
};
|
2018-06-01 15:53:39 +08:00
|
|
|
} // namespace TabDateTime_
|
2015-10-29 03:52:43 +08:00
|
|
|
|
2016-06-06 03:35:49 +08:00
|
|
|
struct TabDateTime
|
|
|
|
: sqlpp::table_t<TabDateTime, TabDateTime_::ColDayPoint, TabDateTime_::ColTimePoint, TabDateTime_::ColTimeOfDay>
|
2015-10-29 03:52:43 +08:00
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
2019-10-05 16:20:15 +08:00
|
|
|
static constexpr const char _literal[] = "tab_date_time";
|
2015-10-29 03:52:43 +08:00
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T tabDateTime;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return tabDateTime;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return tabDateTime;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2018-06-01 15:53:39 +08:00
|
|
|
} // namespace test
|