23 lines
587 B
C++
23 lines
587 B
C++
#ifndef NOOP_BACKEND_SERVICE_HPP
|
|
#define NOOP_BACKEND_SERVICE_HPP
|
|
|
|
#include "matador/sql/backend_provider.hpp"
|
|
|
|
#include <unordered_set>
|
|
|
|
namespace matador::test::orm {
|
|
|
|
class test_backend_service final : public sql::backend_provider::basic_backend_service {
|
|
public:
|
|
sql::connection_impl *create(const sql::connection_info &info) override;
|
|
void destroy(sql::connection_impl *impl) override;
|
|
[[nodiscard]] const sql::dialect *dialect() const override;
|
|
|
|
private:
|
|
std::unordered_set<std::unique_ptr<sql::connection_impl>> noop_connections_;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //NOOP_BACKEND_SERVICE_HPP
|