introduced field_attributes shortcuts and added method on_base() to all processor classes

This commit is contained in:
2026-04-22 11:03:33 +02:00
parent 78eb5d04cd
commit 9b25f7f556
68 changed files with 248 additions and 151 deletions
+6 -5
View File
@@ -20,14 +20,15 @@ struct author {
template<typename Operator>
void process( Operator& op ) {
namespace field = matador::access;
using namespace matador;
namespace field = access;
field::primary_key( op, "id", id );
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, "first_name", first_name, VarChar63 );
field::attribute( op, "last_name", last_name, VarChar63 );
field::attribute( op, "date_of_birth", date_of_birth, VarChar63 );
field::attribute( op, "year_of_birth", year_of_birth );
field::attribute( op, "distinguished", distinguished );
field::has_many( op, "books", books, "author_id", matador::utils::CascadeNoneFetchLazy );
field::has_many( op, "books", books, "author_id", utils::CascadeNoneFetchLazy );
}
};
}