query/test/backends/SessionFixture.hpp

30 lines
495 B
C++

#ifndef MATADOR_SESSION_FIXTURE_HPP
#define MATADOR_SESSION_FIXTURE_HPP
#include "matador/orm/session.hpp"
#include "connection.hpp"
#include <stack>
namespace matador::test {
class SessionFixture {
public:
SessionFixture();
~SessionFixture();
protected:
sql::connection_pool<sql::connection> pool;
std::stack <std::string> tables_to_drop;
orm::session ses;
private:
void drop_table_if_exists(const std::string &table_name) const;
};
}
#endif //MATADOR_SESSION_FIXTURE_HPP