34 lines
637 B
C++
34 lines
637 B
C++
#ifndef MATADOR_QUERY_FIXTURE_HPP
|
|
#define MATADOR_QUERY_FIXTURE_HPP
|
|
|
|
#include "matador/object/schema.hpp"
|
|
|
|
#include "matador/sql/connection.hpp"
|
|
|
|
#include "connection.hpp"
|
|
|
|
#include <stack>
|
|
|
|
namespace matador::test {
|
|
|
|
class QueryFixture {
|
|
public:
|
|
QueryFixture();
|
|
~QueryFixture();
|
|
|
|
void check_table_exists(const std::string &table_name) const;
|
|
void check_table_not_exists(const std::string &table_name) const;
|
|
|
|
protected:
|
|
sql::connection db;
|
|
std::stack <std::string> tables_to_drop;
|
|
object::schema schema;
|
|
|
|
private:
|
|
void drop_table_if_exists(const std::string &table_name) const;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //MATADOR_QUERY_FIXTURE_HPP
|