diff --git a/db-schema/schema.sql b/db-schema/schema.sql index 6b668fb9936b48551decbaafafeac644a8c0ff3a..1c2cd48264c66949fc5b9f70327e63af65a69ff0 100755 --- a/db-schema/schema.sql +++ b/db-schema/schema.sql @@ -1,8 +1,8 @@ -DROP DATABASE IF EXISTS hdbpp_test; +DROP DATABASE IF EXISTS hdbpp; -- Create the hdb database and use it -CREATE DATABASE hdbpp_test; -\c hdbpp_test +CREATE DATABASE hdbpp; +\c hdbpp -- Add the timescaledb extension (Important) CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE; diff --git a/src/DbConnection.tpp b/src/DbConnection.tpp index 2323eeb83a268d88027c81ae8e9594129f67b822..05b799f13dd18639ebcad982c1364f13cdd3ee58 100644 --- a/src/DbConnection.tpp +++ b/src/DbConnection.tpp @@ -45,16 +45,8 @@ namespace pqxx_conn { static void run(std::unique_ptr<std::vector<std::string>> &value, pqxx::work &tx) { - cout << "dump " << endl; - - for (auto &str : *value) - cout << str << " "; - - for (auto &str : *value) + for (auto &str : *value) str = tx.quote(str); - - for (auto &str : *value) - cout << str << " "; } }; diff --git a/src/PqxxExtension.hpp b/src/PqxxExtension.hpp index ec05de3a01c9bb9f1b53275761d2ba4e53afb3ff..f157434c5bd3eebe6adcd654010ff04ad57fa276 100644 --- a/src/PqxxExtension.hpp +++ b/src/PqxxExtension.hpp @@ -198,8 +198,6 @@ public: last_position = position + 3; position = in.find(sep, position + 1); } - - std::cout << "ITS " << str << std::endl; } static std::string to_string(const std::vector<std::string> &value) diff --git a/test/DbConnectionTests.cpp b/test/DbConnectionTests.cpp index 695fed0ef4d30f0ce7f0411ce0ebf6be7b355ccf..013e2412c5a3e33cf6eb44e3d172e016a2be3956 100644 --- a/test/DbConnectionTests.cpp +++ b/test/DbConnectionTests.cpp @@ -759,9 +759,9 @@ TEST_CASE("Storing event data of all Tango type combinations in the database", psql_conn_test::clearTable(test_conn, CONF_TABLE_NAME); vector<unsigned int> types { -// Tango::DEV_BOOLEAN, - // Tango::DEV_DOUBLE, - // Tango::DEV_FLOAT, + // Tango::DEV_BOOLEAN, + // Tango::DEV_DOUBLE, + // Tango::DEV_FLOAT, Tango::DEV_STRING, Tango::DEV_LONG, Tango::DEV_ULONG, @@ -772,7 +772,7 @@ TEST_CASE("Storing event data of all Tango type combinations in the database", Tango::DEV_UCHAR, Tango::DEV_STATE, //Tango::DEV_ENCODED, Tango::DEV_ENUM - }; + }; vector<Tango::AttrWriteType> write_types {Tango::READ, Tango::WRITE, Tango::READ_WRITE, Tango::READ_WITH_WRITE}; vector<Tango::AttrDataFormat> format_types {Tango::SCALAR, Tango::SPECTRUM}; @@ -793,8 +793,9 @@ TEST_CASE("Storing event data of all Tango type combinations in the database", switch (traits.type()) { case Tango::DEV_BOOLEAN: - psql_conn_test::checkStoreTestEventData( - test_conn, traits, psql_conn_test::storeTestEventData<Tango::DEV_BOOLEAN>(conn, traits)); + psql_conn_test::checkStoreTestEventData(test_conn, + traits, + psql_conn_test::storeTestEventData<Tango::DEV_BOOLEAN>(conn, traits)); break; diff --git a/test/TestHelpers.hpp b/test/TestHelpers.hpp index 00e31e4690c3d2e3db8c32b5da1363b050701b0f..9974565e40af1eced5f1c733004083198277d7a0 100644 --- a/test/TestHelpers.hpp +++ b/test/TestHelpers.hpp @@ -37,7 +37,7 @@ namespace psql_conn_test { // connection strings const std::string ConnectionString = "user=postgres password=password host=hdb1"; - const std::string HdbppConnectionString = "user=postgres password=password host=hdb1 dbname=hdbpp_test"; + const std::string HdbppConnectionString = "user=postgres password=password host=hdb1 dbname=hdbpp_test_dev"; } // namespace postgres_db } // namespace psql_conn_test @@ -66,7 +66,8 @@ namespace attr_name namespace attr_info { - const std::string AttrInfoDescription = "Description about attribute, its \"quoted\", and 'quoted', yet does it work?"; + const std::string AttrInfoDescription = + "Description about attribute, its \"quoted\", and 'quoted', yet does it work?"; const std::string AttrInfoLabel = "Label"; const std::string AttrInfoUnit = "Unit %"; const std::string AttrInfoStandardUnit = "Standard Unit"; diff --git a/thirdparty/libhdbpp b/thirdparty/libhdbpp deleted file mode 160000 index b8087c4d0c65d90f6dab1f9357eac4adeecc2d0c..0000000000000000000000000000000000000000 --- a/thirdparty/libhdbpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b8087c4d0c65d90f6dab1f9357eac4adeecc2d0c diff --git a/thirdparty/libpqxx b/thirdparty/libpqxx deleted file mode 160000 index c9a1b7a1266ad0177c0e326f537141c99e077dd0..0000000000000000000000000000000000000000 --- a/thirdparty/libpqxx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c9a1b7a1266ad0177c0e326f537141c99e077dd0 diff --git a/thirdparty/spdlog b/thirdparty/spdlog deleted file mode 160000 index a7148b718ea2fabb8387cb90aee9bf448da63e65..0000000000000000000000000000000000000000 --- a/thirdparty/spdlog +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a7148b718ea2fabb8387cb90aee9bf448da63e65