added belongs-to-eager test
This commit is contained in:
+12
-15
@@ -8,23 +8,20 @@
|
||||
#include <string>
|
||||
|
||||
namespace matador::test {
|
||||
struct optional {
|
||||
unsigned int id{};
|
||||
std::optional<std::string> name;
|
||||
std::optional<unsigned int> age{};
|
||||
|
||||
struct optional
|
||||
{
|
||||
unsigned int id{};
|
||||
std::optional<std::string> name;
|
||||
std::optional<unsigned int> age{};
|
||||
|
||||
template<class Operator>
|
||||
void process(Operator &op) {
|
||||
namespace field = matador::access;
|
||||
using namespace matador::utils;
|
||||
field::primary_key(op, "id", id);
|
||||
field::attribute(op, "name", name, 255);
|
||||
field::attribute(op, "age", age);
|
||||
}
|
||||
template<class Operator>
|
||||
void process(Operator &op) {
|
||||
namespace field = matador::access;
|
||||
using namespace matador::utils;
|
||||
field::primary_key(op, "id", id);
|
||||
field::attribute(op, "name", name, 255);
|
||||
field::attribute(op, "age", age);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //QUERY_OPTIONAL_HPP
|
||||
|
||||
Reference in New Issue
Block a user