mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add LevelDB player database (#9982)
This commit is contained in:
parent
3f0cbbc372
commit
982a030f33
4 changed files with 138 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue