column, placeholder and column_value generator progress

This commit is contained in:
Sascha Kühl
2025-11-12 15:53:03 +01:00
parent 9e76203bc9
commit 1c5b2b21b0
16 changed files with 93 additions and 236 deletions
+6 -5
View File
@@ -3,7 +3,8 @@
#include "ColorEnumTraits.hpp"
#include "matador/sql/connection.hpp"
#include "matador/sql/column_generator.hpp"
#include "matador/query/generator.hpp"
#include "matador/query/query.hpp"
#include "QueryFixture.hpp"
@@ -32,13 +33,13 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ
location loc{1, "center", {1, 2, 3}, Color::Black};
auto res = query::insert()
.into("location", column_generator::generate<location>(repo, true))
.into("location", generator::columns<location>(repo))
.values(loc)
.execute(db);
REQUIRE(res.is_ok());
REQUIRE(*res == 1);
auto result = query::select(column_generator::generate<location>(repo, true))
auto result = query::select(generator::columns<location>(repo))
.from("location")
.fetch_one<location>(db);
@@ -54,7 +55,7 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ
location loc{1, "center", {1, 2, 3}, Color::Black};
auto stmt = query::insert()
.into("location", column_generator::generate<location>(repo, true))
.into("location", generator::columns<location>(repo))
.values<location>()
.prepare(db);
REQUIRE(stmt);
@@ -63,7 +64,7 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ
REQUIRE(res.is_ok());
REQUIRE(*res == 1);
auto result = query::select(column_generator::generate<location>(repo, true))
auto result = query::select(generator::columns<location>(repo))
.from("location")
.fetch_one<location>(db);