entity query builder progress
This commit is contained in:
+12
-5
@@ -7,18 +7,25 @@
|
||||
|
||||
namespace matador::test {
|
||||
|
||||
struct category
|
||||
struct author
|
||||
{
|
||||
unsigned long id{};
|
||||
std::string name;
|
||||
std::string first_name;
|
||||
std::string last_name;
|
||||
std::string date_of_birth;
|
||||
unsigned short year_of_birth{};
|
||||
bool distinguished{false};
|
||||
|
||||
template<class Operator>
|
||||
template<typename Operator>
|
||||
void process(Operator &op)
|
||||
{
|
||||
namespace field = matador::utils::access;
|
||||
using namespace matador::utils;
|
||||
field::primary_key(op, "id", id);
|
||||
field::attribute(op, "name", name, 255);
|
||||
field::attribute(op, "first_name", first_name, 63);
|
||||
field::attribute(op, "last_name", last_name, 63);
|
||||
field::attribute(op, "date_of_birth", date_of_birth, 31);
|
||||
field::attribute(op, "year_of_birth", year_of_birth);
|
||||
field::attribute(op, "distinguished", distinguished);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user