query progress

This commit is contained in:
2024-02-28 18:02:12 +01:00
parent b9709d14c2
commit 7e1713ddd3
25 changed files with 405 additions and 221 deletions
@@ -66,7 +66,7 @@ std::unique_ptr<sql::query_result_impl> postgres_connection::fetch(const std::st
std::string postgres_connection::generate_statement_name(const sql::query_context &query)
{
std::stringstream name;
name << query.table_name << "_" << query.command_name;
name << query.table.name << "_" << query.command_name;
auto result = postgres_connection::statement_name_map_.find(name.str());
if (result == postgres_connection::statement_name_map_.end()) {
+1 -1
View File
@@ -12,7 +12,7 @@ list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
include(CTest)
include(Catch)
set(POSTGRES_CONNECTION_STRING "postgres://test:test123@127.0.0.1:15432/test")
set(POSTGRES_CONNECTION_STRING "postgres://test:test123@127.0.0.1:5432/matador_test")
configure_file(Connection.hpp.in ${PROJECT_BINARY_DIR}/backends/postgres/test/connection.hpp @ONLY IMMEDIATE)
+1 -1
View File
@@ -90,7 +90,7 @@ TEST_CASE_METHOD(QueryFixture, "Execute select statement with where clause", "[s
for (const auto &i: result_record) {
REQUIRE(i.size() == 4);
REQUIRE(i.at(0).name() == "id");
REQUIRE(i.at(0).type() == data_type_t::type_unsigned_long);
REQUIRE(i.at(0).type() == data_type_t::type_long_long);
REQUIRE(i.at(0).as<long long>() == george.id);
REQUIRE(i.at(1).name() == "name");
REQUIRE(i.at(1).type() == data_type_t::type_varchar);