removed class query and moved their static methods to simple functions
This commit is contained in:
@@ -13,7 +13,7 @@ using namespace matador::test;
|
||||
|
||||
TEST_CASE_METHOD(TableSequenceFixture, "test create and drop table sequence", "[table_sequence][create][drop]") {
|
||||
const auto next_id_col = "next_id"_col;
|
||||
auto result = query::query::insert()
|
||||
auto result = insert()
|
||||
.into(sequence_table_name, { "name", next_id_col})
|
||||
.values({ "test_seq", 1 })
|
||||
.execute(db);
|
||||
@@ -21,7 +21,7 @@ TEST_CASE_METHOD(TableSequenceFixture, "test create and drop table sequence", "[
|
||||
REQUIRE(result->affected_rows == 1);
|
||||
|
||||
table_column exp(next_id_col - 1);
|
||||
auto id_result = query::query::update(sequence_table_name)
|
||||
auto id_result = update(sequence_table_name)
|
||||
.set(next_id_col, next_id_col + 1)
|
||||
.where("name"_col == "test_seq")
|
||||
.returning((next_id_col - 1).as("id"))
|
||||
@@ -31,7 +31,7 @@ TEST_CASE_METHOD(TableSequenceFixture, "test create and drop table sequence", "[
|
||||
REQUIRE(id_result->has_value());
|
||||
REQUIRE(id_result->value() == 1);
|
||||
|
||||
id_result = query::query::select({next_id_col})
|
||||
id_result = select({next_id_col})
|
||||
.from(sequence_table_name)
|
||||
.where("name"_col == "test_seq")
|
||||
.fetch_value<int64_t>(db);
|
||||
@@ -42,7 +42,7 @@ TEST_CASE_METHOD(TableSequenceFixture, "test create and drop table sequence", "[
|
||||
|
||||
TEST_CASE_METHOD(TableSequenceFixture, "Test nextval and currval through table sequence pk generator", "[table_sequence][nextval][currval]" ) {
|
||||
const auto next_id_col = "next_id"_col;
|
||||
auto result = query::query::insert()
|
||||
auto result = insert()
|
||||
.into(sequence_table_name, { "name", next_id_col})
|
||||
.values({ "test_seq", 1 })
|
||||
.execute(db);
|
||||
|
||||
Reference in New Issue
Block a user