removed class query and moved their static methods to simple functions

This commit is contained in:
2026-03-26 09:34:32 +01:00
parent 3fc08fb7ff
commit fedce38270
23 changed files with 283 additions and 286 deletions
+4 -4
View File
@@ -31,14 +31,14 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ
SECTION("Insert and select with direct execution") {
location loc{1, "center", {1, 2, 3}, Color::Black};
auto res = query::insert()
auto res = insert()
.into("location", generator::columns<location>(repo))
.values(loc)
.execute(db);
REQUIRE(res.is_ok());
REQUIRE(res->affected_rows == 1);
auto result = query::select(generator::columns<location>(repo))
auto result = select(generator::columns<location>(repo))
.from("location")
.fetch_one<location>(db);
@@ -53,7 +53,7 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ
SECTION("Insert and select with prepared statement") {
location loc{1, "center", {1, 2, 3}, Color::Black};
auto stmt = query::insert()
auto stmt = insert()
.into("location", generator::columns<location>(repo))
.values(generator::placeholders<location>())
.prepare(db);
@@ -63,7 +63,7 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ
REQUIRE(res.is_ok());
REQUIRE(res->affected_rows == 1);
auto result = query::select(generator::columns<location>(repo))
auto result = select(generator::columns<location>(repo))
.from("location")
.fetch_one<location>(db);