mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-16 04:47:18 +08:00
291 lines
7.6 KiB
C
291 lines
7.6 KiB
C
|
// generated by ../scripts/ddl2cpp ../test_static_asserts/AssertTables.sql ../test_static_asserts/AssertTables test
|
||
|
#ifndef TEST_ASSERTTABLES_H
|
||
|
#define TEST_ASSERTTABLES_H
|
||
|
|
||
|
#include <sqlpp11/table.h>
|
||
|
#include <sqlpp11/column_types.h>
|
||
|
#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>;
|
||
|
};
|
||
|
struct SomeDate
|
||
|
{
|
||
|
struct _alias_t
|
||
|
{
|
||
|
static constexpr const char _literal[] = "some_date";
|
||
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
||
|
template <typename T>
|
||
|
struct _member_t
|
||
|
{
|
||
|
T someDate;
|
||
|
T& operator()()
|
||
|
{
|
||
|
return someDate;
|
||
|
}
|
||
|
const T& operator()() const
|
||
|
{
|
||
|
return someDate;
|
||
|
}
|
||
|
};
|
||
|
};
|
||
|
using _traits = sqlpp::make_traits<sqlpp::date, sqlpp::tag::can_be_null>;
|
||
|
};
|
||
|
struct SomeDateTime
|
||
|
{
|
||
|
struct _alias_t
|
||
|
{
|
||
|
static constexpr const char _literal[] = "some_date_time";
|
||
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
||
|
template <typename T>
|
||
|
struct _member_t
|
||
|
{
|
||
|
T someDateTime;
|
||
|
T& operator()()
|
||
|
{
|
||
|
return someDateTime;
|
||
|
}
|
||
|
const T& operator()() const
|
||
|
{
|
||
|
return someDateTime;
|
||
|
}
|
||
|
};
|
||
|
};
|
||
|
using _traits = sqlpp::make_traits<sqlpp::date_time, sqlpp::tag::can_be_null>;
|
||
|
};
|
||
|
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>;
|
||
|
};
|
||
|
struct OtherDate
|
||
|
{
|
||
|
struct _alias_t
|
||
|
{
|
||
|
static constexpr const char _literal[] = "other_date";
|
||
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
||
|
template <typename T>
|
||
|
struct _member_t
|
||
|
{
|
||
|
T otherDate;
|
||
|
T& operator()()
|
||
|
{
|
||
|
return otherDate;
|
||
|
}
|
||
|
const T& operator()() const
|
||
|
{
|
||
|
return otherDate;
|
||
|
}
|
||
|
};
|
||
|
};
|
||
|
using _traits = sqlpp::make_traits<sqlpp::date, sqlpp::tag::can_be_null>;
|
||
|
};
|
||
|
struct OtherDateTime
|
||
|
{
|
||
|
struct _alias_t
|
||
|
{
|
||
|
static constexpr const char _literal[] = "other_date_time";
|
||
|
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
|
||
|
template <typename T>
|
||
|
struct _member_t
|
||
|
{
|
||
|
T otherDateTime;
|
||
|
T& operator()()
|
||
|
{
|
||
|
return otherDateTime;
|
||
|
}
|
||
|
const T& operator()() const
|
||
|
{
|
||
|
return otherDateTime;
|
||
|
}
|
||
|
};
|
||
|
};
|
||
|
using _traits = sqlpp::make_traits<sqlpp::date_time, sqlpp::tag::can_be_null>;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
struct TabAllTypes : sqlpp::table_t<TabAllTypes,
|
||
|
TabAllTypes_::SomeString,
|
||
|
TabAllTypes_::SomeInt,
|
||
|
TabAllTypes_::SomeFloat,
|
||
|
TabAllTypes_::SomeBool,
|
||
|
TabAllTypes_::SomeDate,
|
||
|
TabAllTypes_::SomeDateTime,
|
||
|
TabAllTypes_::OtherInt,
|
||
|
TabAllTypes_::OtherFloat,
|
||
|
TabAllTypes_::OtherBool,
|
||
|
TabAllTypes_::OtherDate,
|
||
|
TabAllTypes_::OtherDateTime>
|
||
|
{
|
||
|
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;
|
||
|
}
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
#endif
|