removed class query and moved their static methods to simple functions
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user