diff options
| author | ilotterytea <iltsu@alright.party> | 2025-07-02 03:31:54 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-07-02 03:31:54 +0500 |
| commit | 79be89ad0491bfdd110b2c612e21a0f28c29fa87 (patch) | |
| tree | 589daab514de11cc87e424b62d87f8cac12494ab /bot/src/database.cpp | |
| parent | fea3c12d6b621796bb239cebb57a5a5014dfe350 (diff) | |
feat: MARIADB SUPPORT!!!!
Diffstat (limited to 'bot/src/database.cpp')
| -rw-r--r-- | bot/src/database.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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 <memory> + +namespace bot::db { + std::unique_ptr<BaseDatabase> create_connection(const Configuration &cfg) { +#if USE_POSTGRES + return std::make_unique<PostgresDatabase>(GET_DATABASE_CONNECTION_URL(cfg)); +#elif defined(USE_MARIADB) + return std::make_unique<MariaDatabase>(cfg); +#endif + } +}
\ No newline at end of file |
