summaryrefslogtreecommitdiff
path: root/libodbcpp/odbc-mock.h
blob: aa5169499a3f4744b95d17cdca0879dbcf1e1ad3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef MOCKODBCDATASOURCE_H
#define MOCKODBCDATASOURCE_H

#include <c++11Helpers.h>
#include <connection_fwd.h>
#include <filesystem>
#include <mockDatabase.h>
#include <string>
#include <vector>
#include <visibility.h>

namespace ODBC {

	class DLL_PUBLIC Mock : public DB::MockServerDatabase {
	public:
		Mock(const std::string & base, const std::string & master, const std::string & name,
				const std::vector<std::filesystem::path> & ss);
		~Mock() override;

		SPECIAL_MEMBERS_MOVE_RO(Mock);

		const std::string base;

	protected:
		void DropDatabase() const override;

	private:
		[[nodiscard]] DB::ConnectionPtr openConnection() const override;
	};

}

#endif