Created an interface for the Db class
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "database/Db.hpp"
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
@@ -31,6 +29,8 @@
|
||||
#include "database/Session.hpp"
|
||||
#include "database/User.hpp"
|
||||
|
||||
#include "Db.hpp"
|
||||
|
||||
namespace lms::db
|
||||
{
|
||||
namespace
|
||||
@@ -134,6 +134,11 @@ namespace lms::db
|
||||
}
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<IDb> createDb(const std::filesystem::path& dbPath, std::size_t connectionCount)
|
||||
{
|
||||
return std::make_unique<Db>(dbPath, connectionCount);
|
||||
}
|
||||
|
||||
// Session living class handling the database and the login
|
||||
Db::Db(const std::filesystem::path& dbPath, std::size_t connectionCount)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user