2023-07-25 13:00:05 +08:00
|
|
|
#pragma once
|
|
|
|
|
2015-10-14 03:25:10 +08:00
|
|
|
// generated by ../scripts/ddl2cpp ../test_static_asserts/AssertTables.sql ../test_static_asserts/AssertTables test
|
|
|
|
|
|
|
|
#include <sqlpp11/table.h>
|
2015-10-30 05:21:46 +08:00
|
|
|
#include <sqlpp11/data_types.h>
|
2015-10-14 03:25:10 +08:00
|
|
|
#include <sqlpp11/char_sequence.h>
|
|
|
|
|
|
|
|
namespace test
|
|
|
|
{
|
|
|
|
namespace TabAllTypes_
|
|
|
|
{
|
|
|
|
struct SomeString
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "some_string";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T someString;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return someString;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return someString;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::varchar, sqlpp::tag::can_be_null>;
|
|
|
|
};
|
|
|
|
struct SomeInt
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "some_int";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T someInt;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return someInt;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return someInt;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::bigint, sqlpp::tag::can_be_null>;
|
|
|
|
};
|
|
|
|
struct SomeFloat
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "some_float";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T someFloat;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return someFloat;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return someFloat;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::floating_point, sqlpp::tag::can_be_null>;
|
|
|
|
};
|
|
|
|
struct SomeBool
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "some_bool";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T someBool;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return someBool;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return someBool;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::boolean, sqlpp::tag::can_be_null>;
|
|
|
|
};
|
2015-10-29 23:41:45 +08:00
|
|
|
struct SomeDayPoint
|
2015-10-14 03:25:10 +08:00
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
static constexpr const char _literal[] = "some_day_point";
|
2015-10-14 03:25:10 +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 someDayPoint;
|
2015-10-14 03:25:10 +08:00
|
|
|
T& operator()()
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return someDayPoint;
|
2015-10-14 03:25:10 +08:00
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return someDayPoint;
|
2015-10-14 03:25:10 +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-14 03:25:10 +08:00
|
|
|
};
|
2015-10-29 23:41:45 +08:00
|
|
|
struct SomeTimePoint
|
2015-10-14 03:25:10 +08:00
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
static constexpr const char _literal[] = "some_time_point";
|
2015-10-14 03:25:10 +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 someTimePoint;
|
2015-10-14 03:25:10 +08:00
|
|
|
T& operator()()
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return someTimePoint;
|
2015-10-14 03:25:10 +08:00
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return someTimePoint;
|
2015-10-14 03:25:10 +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-14 03:25:10 +08:00
|
|
|
};
|
2016-04-08 03:47:17 +08:00
|
|
|
struct OtherString
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "other_string";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T otherString;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return otherString;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return otherString;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::varchar, sqlpp::tag::can_be_null>;
|
|
|
|
};
|
2015-10-14 03:25:10 +08:00
|
|
|
struct OtherInt
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "other_int";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T otherInt;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return otherInt;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return otherInt;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::bigint, sqlpp::tag::can_be_null>;
|
|
|
|
};
|
|
|
|
struct OtherFloat
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "other_float";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T otherFloat;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return otherFloat;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return otherFloat;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::floating_point, sqlpp::tag::can_be_null>;
|
|
|
|
};
|
|
|
|
struct OtherBool
|
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "other_bool";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T otherBool;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return otherBool;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return otherBool;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
using _traits = sqlpp::make_traits<sqlpp::boolean, sqlpp::tag::can_be_null>;
|
|
|
|
};
|
2015-10-29 23:41:45 +08:00
|
|
|
struct OtherDayPoint
|
2015-10-14 03:25:10 +08:00
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
static constexpr const char _literal[] = "other_day_point";
|
2015-10-14 03:25:10 +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 otherDayPoint;
|
2015-10-14 03:25:10 +08:00
|
|
|
T& operator()()
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return otherDayPoint;
|
2015-10-14 03:25:10 +08:00
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return otherDayPoint;
|
2015-10-14 03:25:10 +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-14 03:25:10 +08:00
|
|
|
};
|
2015-10-29 23:41:45 +08:00
|
|
|
struct OtherTimePoint
|
2015-10-14 03:25:10 +08:00
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
static constexpr const char _literal[] = "other_time_point";
|
2015-10-14 03:25:10 +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 otherTimePoint;
|
2015-10-14 03:25:10 +08:00
|
|
|
T& operator()()
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return otherTimePoint;
|
2015-10-14 03:25:10 +08:00
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
2015-10-29 23:41:45 +08:00
|
|
|
return otherTimePoint;
|
2015-10-14 03:25:10 +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-14 03:25:10 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
struct TabAllTypes : sqlpp::table_t<TabAllTypes,
|
|
|
|
TabAllTypes_::SomeString,
|
|
|
|
TabAllTypes_::SomeInt,
|
|
|
|
TabAllTypes_::SomeFloat,
|
|
|
|
TabAllTypes_::SomeBool,
|
2015-10-29 23:41:45 +08:00
|
|
|
TabAllTypes_::SomeDayPoint,
|
|
|
|
TabAllTypes_::SomeTimePoint,
|
2016-04-08 03:47:17 +08:00
|
|
|
TabAllTypes_::OtherString,
|
2015-10-14 03:25:10 +08:00
|
|
|
TabAllTypes_::OtherInt,
|
|
|
|
TabAllTypes_::OtherFloat,
|
|
|
|
TabAllTypes_::OtherBool,
|
2015-10-29 23:41:45 +08:00
|
|
|
TabAllTypes_::OtherDayPoint,
|
|
|
|
TabAllTypes_::OtherTimePoint>
|
2015-10-14 03:25:10 +08:00
|
|
|
{
|
|
|
|
struct _alias_t
|
|
|
|
{
|
|
|
|
static constexpr const char _literal[] = "tab_all_types";
|
|
|
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
|
|
|
template <typename T>
|
|
|
|
struct _member_t
|
|
|
|
{
|
|
|
|
T tabAllTypes;
|
|
|
|
T& operator()()
|
|
|
|
{
|
|
|
|
return tabAllTypes;
|
|
|
|
}
|
|
|
|
const T& operator()() const
|
|
|
|
{
|
|
|
|
return tabAllTypes;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|