From 982a030f330bd4f4953ed7d4a7f88286f6fd645d Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sat, 13 Jun 2020 04:54:20 +1200 Subject: Add LevelDB player database (#9982) --- src/serverenvironment.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/serverenvironment.cpp') diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp index 222b4d203..2c6a39ee3 100644 --- a/src/serverenvironment.cpp +++ b/src/serverenvironment.cpp @@ -2089,6 +2089,7 @@ PlayerDatabase *ServerEnvironment::openPlayerDatabase(const std::string &name, if (name == "dummy") return new Database_Dummy(); + #if USE_POSTGRESQL if (name == "postgresql") { std::string connect_string; @@ -2096,6 +2097,12 @@ PlayerDatabase *ServerEnvironment::openPlayerDatabase(const std::string &name, return new PlayerDatabasePostgreSQL(connect_string); } #endif + +#if USE_LEVELDB + if (name == "leveldb") + return new PlayerDatabaseLevelDB(savedir); +#endif + if (name == "files") return new PlayerDatabaseFiles(savedir + DIR_DELIM + "players"); @@ -2116,7 +2123,7 @@ bool ServerEnvironment::migratePlayersDatabase(const GameParams &game_params, if (!world_mt.exists("player_backend")) { errorstream << "Please specify your current backend in world.mt:" << std::endl - << " player_backend = {files|sqlite3|postgresql}" + << " player_backend = {files|sqlite3|leveldb|postgresql}" << std::endl; return false; } -- cgit v1.2.3