enabled backend tests for postgres (doesn't compile)

This commit is contained in:
Sascha Kühl 2025-02-11 22:22:06 +01:00
parent 55f9f8cf67
commit 42acaf24ce
4 changed files with 11 additions and 9 deletions

View File

@ -18,7 +18,7 @@ set(SOURCES
set(LIBRARY_TARGET matador-postgres) set(LIBRARY_TARGET matador-postgres)
#add_subdirectory(test) add_subdirectory(test)
add_library(${LIBRARY_TARGET} MODULE ${SOURCES} ${HEADER}) add_library(${LIBRARY_TARGET} MODULE ${SOURCES} ${HEADER})

View File

@ -1,8 +1,9 @@
#ifndef MATADOR_QUERY_FIXTURE_HPP #ifndef MATADOR_QUERY_FIXTURE_HPP
#define MATADOR_QUERY_FIXTURE_HPP #define MATADOR_QUERY_FIXTURE_HPP
#include "matador/object/schema.hpp"
#include "matador/sql/connection.hpp" #include "matador/sql/connection.hpp"
#include "matador/sql/schema.hpp"
#include "connection.hpp" #include "connection.hpp"

View File

@ -1,8 +1,9 @@
#include "catch2/catch_test_macros.hpp" #include "catch2/catch_test_macros.hpp"
#include "matador/sql/column_definition.hpp" #include "matador/object/attribute_definition.hpp"
#include "matador/sql/condition.hpp"
#include "matador/sql/query.hpp" #include "matador/query/condition.hpp"
#include "matador/query/query.hpp"
#include "QueryFixture.hpp" #include "QueryFixture.hpp"
@ -13,9 +14,9 @@
using namespace matador::sql; using namespace matador::sql;
using namespace matador::test; 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>("airplane"); schema.attach<airplane>("airplane");
schema.attach<flight>("flight"); schema.attach<flight>("flight");
auto res = query::create() auto res = query::create()

View File

@ -1,7 +1,7 @@
#ifndef MATADOR_SESSION_FIXTURE_HPP #ifndef MATADOR_SESSION_FIXTURE_HPP
#define MATADOR_SESSION_FIXTURE_HPP #define MATADOR_SESSION_FIXTURE_HPP
#include "matador/sql/session.hpp" #include "matador/orm/session.hpp"
#include "connection.hpp" #include "connection.hpp"
@ -16,8 +16,8 @@ public:
protected: protected:
sql::connection_pool<sql::connection> pool; sql::connection_pool<sql::connection> pool;
sql::session ses;
std::stack <std::string> tables_to_drop; std::stack <std::string> tables_to_drop;
orm::session ses;
private: private:
void drop_table_if_exists(const std::string &table_name) const; void drop_table_if_exists(const std::string &table_name) const;