Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
ModStorageDatabasePostgreSQL Class Reference

#include <database-postgresql.h>

+ Inheritance diagram for ModStorageDatabasePostgreSQL:
+ Collaboration diagram for ModStorageDatabasePostgreSQL:

Public Member Functions

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

Protected Member Functions

virtual void createDatabase ()
 
virtual void initStatements ()
 

Additional Inherited Members

- Private Member Functions inherited from Database_PostgreSQL
 Database_PostgreSQL (const std::string &connect_string, const char *type)
 
 ~Database_PostgreSQL ()
 
void rollback ()
 
bool initialized () const
 
int pg_to_int (PGresult *res, int row, int col)
 
u32 pg_to_uint (PGresult *res, int row, int col)
 
float pg_to_float (PGresult *res, int row, int col)
 
v3s16 pg_to_v3s16 (PGresult *res, int row, int col)
 
std::string pg_to_string (PGresult *res, int row, int col)
 
PGresult * execPrepared (const char *stmtName, const int paramsNumber, const void **params, const int *paramsLengths=NULL, const int *paramsFormats=NULL, bool clear=true, bool nobinary=true)
 
PGresult * execPrepared (const char *stmtName, const int paramsNumber, const char **params, bool clear=true, bool nobinary=true)
 
void createTableIfNotExists (const std::string &table_name, const std::string &definition)
 
void verifyDatabase ()
 
void connectToDatabase ()
 
void prepareStatement (const std::string &name, const std::string &sql)
 
int getPGVersion () const
 

Constructor & Destructor Documentation

◆ ModStorageDatabasePostgreSQL()

ModStorageDatabasePostgreSQL::ModStorageDatabasePostgreSQL ( const std::string & connect_string)

◆ ~ModStorageDatabasePostgreSQL()

ModStorageDatabasePostgreSQL::~ModStorageDatabasePostgreSQL ( )
default

Member Function Documentation

◆ beginSave()

void ModStorageDatabasePostgreSQL::beginSave ( )
inlinevirtual

Reimplemented from Database_PostgreSQL.

References Database_PostgreSQL::beginSave().

+ Here is the call graph for this function:

◆ createDatabase()

virtual void ModStorageDatabasePostgreSQL::createDatabase ( )
protectedvirtual

Implements Database_PostgreSQL.

◆ endSave()

void ModStorageDatabasePostgreSQL::endSave ( )
inlinevirtual

Reimplemented from Database_PostgreSQL.

References Database_PostgreSQL::endSave().

+ Here is the call graph for this function:

◆ getModEntries()

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

Implements ModStorageDatabase.

◆ getModEntry()

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

Implements ModStorageDatabase.

◆ getModKeys()

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

Implements ModStorageDatabase.

◆ hasModEntry()

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

Implements ModStorageDatabase.

◆ initStatements()

virtual void ModStorageDatabasePostgreSQL::initStatements ( )
protectedvirtual

Implements Database_PostgreSQL.

◆ listMods()

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

Implements ModStorageDatabase.

◆ removeModEntries()

bool ModStorageDatabasePostgreSQL::removeModEntries ( const std::string & modname)
virtual

Implements ModStorageDatabase.

◆ removeModEntry()

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

Implements ModStorageDatabase.

◆ setModEntry()

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

Implements ModStorageDatabase.


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