entity query builder progress

This commit is contained in:
2024-03-05 20:14:34 +01:00
parent be610ffcad
commit 496e94ddcd
4 changed files with 87 additions and 12 deletions
+12 -5
View File
@@ -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);
}
};