1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add redis database backend

This commit is contained in:
Sfan5 2014-04-08 21:39:21 +02:00
parent db60ae0459
commit 674be38fc2
7 changed files with 322 additions and 1 deletions

View file

@ -46,6 +46,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#if USE_LEVELDB
#include "database-leveldb.h"
#endif
#if USE_REDIS
#include "database-redis.h"
#endif
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
@ -2434,6 +2437,10 @@ ServerMap::ServerMap(std::string savedir, IGameDef *gamedef, EmergeManager *emer
else if (backend == "leveldb")
dbase = new Database_LevelDB(this, savedir);
#endif
#if USE_REDIS
else if (backend == "redis")
dbase = new Database_Redis(this, savedir);
#endif
else
throw BaseException("Unknown map backend");
}