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
@@ -40,7 +40,7 @@ protected:
TEST_CASE_METHOD(StatementTestFixture, "Create prepared statement", "[statement]") {
using namespace matador::utils;
SECTION("Insert with prepared statement and placeholder") {
auto stmt = query::insert()
auto stmt = insert()
.into(AIRPLANE, {AIRPLANE.id, AIRPLANE.brand, AIRPLANE.model})
.values(generator::placeholders<airplane>())
.prepare(db);
@@ -53,7 +53,7 @@ TEST_CASE_METHOD(StatementTestFixture, "Create prepared statement", "[statement]
stmt->reset();
}
auto result = query::select({AIRPLANE.id, AIRPLANE.brand, AIRPLANE.model})
auto result = select({AIRPLANE.id, AIRPLANE.brand, AIRPLANE.model})
.from(AIRPLANE)
.fetch_all<airplane>(db);
@@ -68,7 +68,7 @@ TEST_CASE_METHOD(StatementTestFixture, "Create prepared statement", "[statement]
SECTION("Select with prepared statement") {
for (const auto &plane: planes) {
auto res = query::insert()
auto res = insert()
.into(AIRPLANE, {AIRPLANE.id, AIRPLANE.brand, AIRPLANE.model})
.values(plane)
.execute(db);
@@ -76,7 +76,7 @@ TEST_CASE_METHOD(StatementTestFixture, "Create prepared statement", "[statement]
REQUIRE(res->affected_rows == 1);
}
auto stmt = query::select({AIRPLANE.id, AIRPLANE.brand, AIRPLANE.model})
auto stmt = select({AIRPLANE.id, AIRPLANE.brand, AIRPLANE.model})
.from(AIRPLANE)
.where(AIRPLANE.brand == _)
.prepare(db);