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
@@ -21,6 +21,8 @@ public:
access::process(*this, obj);
}
template<typename BaseType>
static void on_base(const BaseType&) {}
template<typename PrimaryKeyType>
void on_primary_key(const char * /*id*/, PrimaryKeyType &pk, const primary_key_attribute & = DefaultPkAttributes) {
const auto value = pk_.as<PrimaryKeyType>();
@@ -51,6 +53,8 @@ private:
struct pk_unset_checker {
bool unset{true};
template<typename BaseType>
static void on_base(const BaseType&) {}
template<class PrimaryKeyType>
void on_primary_key(const char * /*id*/, PrimaryKeyType &pk, const primary_key_attribute & = DefaultPkAttributes) {
unset = !identifier_type_traits<PrimaryKeyType>::is_valid(pk);
@@ -73,6 +77,8 @@ struct pk_unset_checker {
struct primary_key_getter {
std::uint64_t value{0};
template<typename BaseType>
static void on_base(const BaseType&) {}
template<class PrimaryKeyType>
void on_primary_key(const char * /*id*/, PrimaryKeyType &pk, const primary_key_attribute & = DefaultPkAttributes) {
pk_ = pk;