From 7813d34268513a775faea45cb96ae6ee2bcd983d Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Tue, 30 Apr 2024 01:06:57 +0500 Subject: feat: macro for generating database connection urls --- src/config.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/config.hpp b/src/config.hpp index 6f4c765..2e02f1d 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -3,6 +3,11 @@ #include #include +#define GET_DATABASE_CONNECTION_URL(c) \ + "dbname = " + c.database.name + " user = " + c.database.user + \ + " password = " + c.database.password + " host = " + c.database.host + \ + " port = " + c.database.port + namespace bot { struct DatabaseConfiguration { std::string name; -- cgit v1.2.3