diff --git a/backends/postgres/CMakeLists.txt b/backends/postgres/CMakeLists.txt index aa5da49..440e84b 100644 --- a/backends/postgres/CMakeLists.txt +++ b/backends/postgres/CMakeLists.txt @@ -18,7 +18,7 @@ set(SOURCES set(LIBRARY_TARGET matador-postgres) -#add_subdirectory(test) +add_subdirectory(test) add_library(${LIBRARY_TARGET} MODULE ${SOURCES} ${HEADER}) diff --git a/test/backends/QueryFixture.hpp b/test/backends/QueryFixture.hpp index 07c31fd..04dbe27 100644 --- a/test/backends/QueryFixture.hpp +++ b/test/backends/QueryFixture.hpp @@ -1,8 +1,9 @@ #ifndef MATADOR_QUERY_FIXTURE_HPP #define MATADOR_QUERY_FIXTURE_HPP +#include "matador/object/schema.hpp" + #include "matador/sql/connection.hpp" -#include "matador/sql/schema.hpp" #include "connection.hpp" diff --git a/test/backends/QueryTest.cpp b/test/backends/QueryTest.cpp index 9d0fcd2..ed13bf0 100644 --- a/test/backends/QueryTest.cpp +++ b/test/backends/QueryTest.cpp @@ -1,8 +1,9 @@ #include "catch2/catch_test_macros.hpp" -#include "matador/sql/column_definition.hpp" -#include "matador/sql/condition.hpp" -#include "matador/sql/query.hpp" +#include "matador/object/attribute_definition.hpp" + +#include "matador/query/condition.hpp" +#include "matador/query/query.hpp" #include "QueryFixture.hpp" @@ -13,9 +14,9 @@ using namespace matador::sql; using namespace matador::test; +using namespace matador::query; -TEST_CASE_METHOD(QueryFixture, "Create table with foreign key relation", "[query][foreign][relation]") -{ +TEST_CASE_METHOD(QueryFixture, "Create table with foreign key relation", "[query][foreign][relation]") { schema.attach("airplane"); schema.attach("flight"); auto res = query::create() diff --git a/test/backends/SessionFixture.hpp b/test/backends/SessionFixture.hpp index 31fd6ed..20b1671 100644 --- a/test/backends/SessionFixture.hpp +++ b/test/backends/SessionFixture.hpp @@ -1,7 +1,7 @@ #ifndef MATADOR_SESSION_FIXTURE_HPP #define MATADOR_SESSION_FIXTURE_HPP -#include "matador/sql/session.hpp" +#include "matador/orm/session.hpp" #include "connection.hpp" @@ -16,8 +16,8 @@ public: protected: sql::connection_pool pool; - sql::session ses; std::stack tables_to_drop; + orm::session ses; private: void drop_table_if_exists(const std::string &table_name) const;