]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/map.cpp
Implement a PostgreSQL backend
[dragonfireclient.git] / src / map.cpp
index 848d2ef13255a715dd0f9c9123431c052704b12c..03daf4fa8b2e4f4f9b994b8847eb2ebe82bd8a1b 100644 (file)
@@ -50,6 +50,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #if USE_REDIS
 #include "database-redis.h"
 #endif
+#if USE_POSTGRESQL
+#include "database-postgresql.h"
+#endif
 
 #define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
 
@@ -3240,6 +3243,10 @@ Database *ServerMap::createDatabase(
        else if (name == "redis")
                return new Database_Redis(conf);
        #endif
+       #if USE_POSTGRESQL
+       else if (name == "postgresql")
+               return new Database_PostgreSQL(conf);
+       #endif
        else
                throw BaseException(std::string("Database backend ") + name + " not supported.");
 }