mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Implement a PostgreSQL backend
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user