added belongs-to-eager test
This commit is contained in:
+13
-15
@@ -8,23 +8,21 @@
|
||||
#include <string>
|
||||
|
||||
namespace matador::test {
|
||||
|
||||
struct person {
|
||||
unsigned int id{};
|
||||
std::string name;
|
||||
unsigned int age{};
|
||||
utils::blob_type_t image{};
|
||||
unsigned int id{};
|
||||
std::string name;
|
||||
unsigned int age{};
|
||||
utils::blob_type_t image{};
|
||||
|
||||
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);
|
||||
field::attribute(op, "image", image);
|
||||
}
|
||||
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);
|
||||
field::attribute(op, "image", image);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
#endif //QUERY_PERSON_HPP
|
||||
|
||||
Reference in New Issue
Block a user