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:
parent
db60ae0459
commit
674be38fc2
7 changed files with 322 additions and 1 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue