renamed fetch types to be pascal case

This commit is contained in:
Sascha Kühl
2025-12-08 13:44:53 +01:00
parent 2fcb504b9a
commit 3b0b9615ca
20 changed files with 35 additions and 38 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ struct author {
field::attribute(op, "date_of_birth", date_of_birth, 31);
field::attribute(op, "year_of_birth", year_of_birth);
field::attribute(op, "distinguished", distinguished);
field::has_many(op, "books", books, "author_id", utils::fetch_type::LAZY);
field::has_many(op, "books", books, "author_id", utils::fetch_type::Lazy);
}
};
+1 -1
View File
@@ -23,7 +23,7 @@ struct book {
namespace field = matador::access;
field::primary_key(op, "id", id);
field::attribute(op, "title", title, 511);
field::belongs_to(op, "author_id", book_author, utils::fetch_type::EAGER);
field::belongs_to(op, "author_id", book_author, utils::fetch_type::Eager);
field::attribute(op, "published_in", published_in);
}
};
+2 -2
View File
@@ -21,7 +21,7 @@ struct department {
namespace field = matador::access;
field::primary_key(op, "id", id);
field::attribute(op, "name", name, 63);
field::has_many(op, "employees", employees, "dep_id", utils::fetch_type::EAGER);
field::has_many(op, "employees", employees, "dep_id", utils::CascadeAllFetchEager);
// field::belongs_to(op, "manager_id", manager, utils::fetch_type::EAGER);
}
};
@@ -38,7 +38,7 @@ struct employee {
field::primary_key(op, "id", id);
field::attribute(op, "first_name", first_name, 63);
field::attribute(op, "last_name", last_name, 63);
field::belongs_to(op, "dep_id", dep, utils::fetch_type::LAZY);
field::belongs_to(op, "dep_id", dep, utils::CascadeAllFetchLazy);
}
};
+1 -1
View File
@@ -28,7 +28,7 @@ struct flight {
namespace field = matador::access;
using namespace matador::utils;
field::primary_key(op, "id", id);
field::belongs_to(op, "airplane_id", plane, {utils::cascade_type::ALL, fetch_type::EAGER});
field::belongs_to(op, "airplane_id", plane, {utils::cascade_type::ALL, fetch_type::Eager});
field::attribute(op, "pilot_name", pilot_name, 255);
}
};
+1 -1
View File
@@ -42,7 +42,7 @@ struct order
field::attribute(op, "ship_region", ship_region, 255);
field::attribute(op, "ship_postal_code", ship_postal_code, 255);
field::attribute(op, "ship_country", ship_country, 255);
field::has_many(op, "order_details", order_details_, "order_id", utils::fetch_type::EAGER);
field::has_many(op, "order_details", order_details_, "order_id", utils::fetch_type::Eager);
}
};
+2 -2
View File
@@ -27,7 +27,7 @@ struct ingredient
namespace field = matador::access;
field::primary_key(op, "id", id);
field::attribute(op, "name", name, 255);
field::has_many_to_many(op, "recipe_ingredients", recipes, "ingredient_id", "recipe_id", utils::fetch_type::EAGER);
field::has_many_to_many(op, "recipe_ingredients", recipes, "ingredient_id", "recipe_id", utils::fetch_type::Eager);
}
};
@@ -46,7 +46,7 @@ struct recipe
namespace field = matador::access;
field::primary_key(op, "id", id);
field::attribute(op, "name", name, 255);
field::has_many_to_many(op, "recipe_ingredients", ingredients, utils::fetch_type::LAZY);
field::has_many_to_many(op, "recipe_ingredients", ingredients, utils::fetch_type::Lazy);
}
};
+2 -2
View File
@@ -29,7 +29,7 @@ struct student {
namespace field = matador::access;
field::primary_key(op, "id", id);
field::attribute(op, "name", name, 255);
field::has_many_to_many(op, "student_courses", courses, "student_id", "course_id", utils::fetch_type::LAZY);
field::has_many_to_many(op, "student_courses", courses, "student_id", "course_id", utils::fetch_type::Lazy);
}
};
@@ -49,7 +49,7 @@ struct course {
namespace field = matador::access;
field::primary_key(op, "id", id);
field::attribute(op, "title", title, 255);
field::has_many_to_many(op, "student_courses", students, utils::fetch_type::EAGER);
field::has_many_to_many(op, "student_courses", students, utils::fetch_type::Eager);
}
};