//SPDX-FileCopyrightText: 2023 Yury Gubich //SPDX-License-Identifier: GPL-3.0-or-later #include "interface.h" #include "mysql/mysql.h" DB::Interface::Interface(Type type): type(type), state(State::disconnected) {} DB::Interface::~Interface() {} std::unique_ptr DB::Interface::create(Type type) { switch (type) { case Type::mysql: return std::make_unique(); } throw std::runtime_error("Unexpected database type: " + std::to_string((uint8_t)type)); } DB::Interface::State DB::Interface::currentState() const { return state; }