From 79be89ad0491bfdd110b2c612e21a0f28c29fa87 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 2 Jul 2025 03:31:54 +0500 Subject: feat: MARIADB SUPPORT!!!! --- bot/src/database.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 bot/src/database.cpp (limited to 'bot/src/database.cpp') diff --git a/bot/src/database.cpp b/bot/src/database.cpp new file mode 100644 index 0000000..dcb7dae --- /dev/null +++ b/bot/src/database.cpp @@ -0,0 +1,13 @@ +#include "database.hpp" + +#include + +namespace bot::db { + std::unique_ptr create_connection(const Configuration &cfg) { +#if USE_POSTGRES + return std::make_unique(GET_DATABASE_CONNECTION_URL(cfg)); +#elif defined(USE_MARIADB) + return std::make_unique(cfg); +#endif + } +} \ No newline at end of file -- cgit v1.2.3