Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
ModStorageDatabase Class Referenceabstract

#include <database.h>

+ Inheritance diagram for ModStorageDatabase:
+ Collaboration diagram for ModStorageDatabase:

Public Member Functions

virtual ~ModStorageDatabase ()=default
 
virtual void getModEntries (const std::string &modname, StringMap *storage)=0
 
virtual void getModKeys (const std::string &modname, std::vector< std::string > *storage)=0
 
virtual bool hasModEntry (const std::string &modname, const std::string &key)=0
 
virtual bool getModEntry (const std::string &modname, const std::string &key, std::string *value)=0
 
virtual bool setModEntry (const std::string &modname, const std::string &key, std::string_view value)=0
 
virtual bool removeModEntry (const std::string &modname, const std::string &key)=0
 
virtual bool removeModEntries (const std::string &modname)=0
 
virtual void listMods (std::vector< std::string > *res)=0
 
- Public Member Functions inherited from Database
virtual void beginSave ()=0
 
virtual void endSave ()=0
 
virtual bool initialized () const
 

Constructor & Destructor Documentation

◆ ~ModStorageDatabase()

virtual ModStorageDatabase::~ModStorageDatabase ( )
virtualdefault

Member Function Documentation

◆ getModEntries()

virtual void ModStorageDatabase::getModEntries ( const std::string & modname,
StringMap * storage )
pure virtual

Implemented in Database_Dummy, ModStorageDatabaseFiles, ModStorageDatabasePostgreSQL, and ModStorageDatabaseSQLite3.

Referenced by ModStorage::getStrings(), Server::migrateModStorageDatabase(), TestModStorageDatabase::testRecall(), TestModStorageDatabase::testRecallChanged(), and TestModStorageDatabase::testRecallFail().

+ Here is the caller graph for this function:

◆ getModEntry()

virtual bool ModStorageDatabase::getModEntry ( const std::string & modname,
const std::string & key,
std::string * value )
pure virtual

Implemented in Database_Dummy, ModStorageDatabaseFiles, ModStorageDatabasePostgreSQL, and ModStorageDatabaseSQLite3.

Referenced by ModStorage::getStringRaw(), TestModStorageDatabase::testRecall(), TestModStorageDatabase::testRecallChanged(), and TestModStorageDatabase::testRecallFail().

+ Here is the caller graph for this function:

◆ getModKeys()

virtual void ModStorageDatabase::getModKeys ( const std::string & modname,
std::vector< std::string > * storage )
pure virtual

Implemented in Database_Dummy, ModStorageDatabaseFiles, ModStorageDatabasePostgreSQL, and ModStorageDatabaseSQLite3.

Referenced by ModStorage::getKeys(), TestModStorageDatabase::testRecall(), and TestModStorageDatabase::testRecallFail().

+ Here is the caller graph for this function:

◆ hasModEntry()

virtual bool ModStorageDatabase::hasModEntry ( const std::string & modname,
const std::string & key )
pure virtual

Implemented in Database_Dummy, ModStorageDatabaseFiles, ModStorageDatabasePostgreSQL, and ModStorageDatabaseSQLite3.

Referenced by ModStorage::contains(), TestModStorageDatabase::testRecall(), TestModStorageDatabase::testRecallChanged(), and TestModStorageDatabase::testRecallFail().

+ Here is the caller graph for this function:

◆ listMods()

virtual void ModStorageDatabase::listMods ( std::vector< std::string > * res)
pure virtual

Implemented in Database_Dummy, ModStorageDatabaseFiles, ModStorageDatabasePostgreSQL, and ModStorageDatabaseSQLite3.

Referenced by Server::migrateModStorageDatabase(), and TestModStorageDatabase::testListMods().

+ Here is the caller graph for this function:

◆ removeModEntries()

virtual bool ModStorageDatabase::removeModEntries ( const std::string & modname)
pure virtual

Implemented in Database_Dummy, ModStorageDatabaseFiles, ModStorageDatabasePostgreSQL, and ModStorageDatabaseSQLite3.

Referenced by ModStorage::clear(), and TestModStorageDatabase::testRemove().

+ Here is the caller graph for this function:

◆ removeModEntry()

virtual bool ModStorageDatabase::removeModEntry ( const std::string & modname,
const std::string & key )
pure virtual

Implemented in Database_Dummy, ModStorageDatabaseFiles, ModStorageDatabasePostgreSQL, and ModStorageDatabaseSQLite3.

Referenced by ModStorage::setString(), and TestModStorageDatabase::testRemove().

+ Here is the caller graph for this function:

◆ setModEntry()

virtual bool ModStorageDatabase::setModEntry ( const std::string & modname,
const std::string & key,
std::string_view value )
pure virtual

Implemented in Database_Dummy, ModStorageDatabaseFiles, ModStorageDatabasePostgreSQL, and ModStorageDatabaseSQLite3.

Referenced by Client::migrateModStorage(), Server::migrateModStorageDatabase(), ModStorage::setString(), TestModStorageDatabase::testChange(), TestModStorageDatabase::testCreate(), and TestModStorageDatabase::testListMods().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: