use table metas where possible

This commit is contained in:
2026-01-09 18:10:23 +01:00
parent ac53526a27
commit b9f5819be5
9 changed files with 173 additions and 404 deletions
+2 -8
View File
@@ -22,18 +22,12 @@ class TypeTraitsTestFixture : public QueryFixture
public:
TypeTraitsTestFixture() {
REQUIRE(db.open());
const auto obj = matador::object::object_generator::generate<location>(repo.repo(), "location");
const auto res = query::create()
.table(obj->name())
.columns(obj->attributes())
.constraints(obj->constraints())
.execute(db);
tables_to_drop.emplace("location");
REQUIRE(repo.attach<location>("location"));
}
};
TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with type traits", "[typetraits]") {
REQUIRE(repo.attach<location>("location"));
REQUIRE(repo.create(db));
SECTION("Insert and select with direct execution") {
location loc{1, "center", {1, 2, 3}, Color::Black};