Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
AuthDatabasePostgreSQL Class Reference

#include <database-postgresql.h>

+ Inheritance diagram for AuthDatabasePostgreSQL:
+ Collaboration diagram for AuthDatabasePostgreSQL:

Public Member Functions

 AuthDatabasePostgreSQL (const std::string &connect_string)
 
virtual ~AuthDatabasePostgreSQL ()=default
 
virtual void verifyDatabase ()
 
virtual bool getAuth (const std::string &name, AuthEntry &res)
 
virtual bool saveAuth (const AuthEntry &authEntry)
 
virtual bool createAuth (AuthEntry &authEntry)
 
virtual bool deleteAuth (const std::string &name)
 
virtual void listNames (std::vector< std::string > &res)
 
virtual void reload ()
 
- Public Member Functions inherited from AuthDatabase
virtual ~AuthDatabase ()=default
 

Protected Member Functions

virtual void createDatabase ()
 
virtual void initStatements ()
 

Private Member Functions

virtual void writePrivileges (const AuthEntry &authEntry)
 
- Private Member Functions inherited from Database_PostgreSQL
 Database_PostgreSQL (const std::string &connect_string, const char *type)
 
 ~Database_PostgreSQL ()
 
void beginSave ()
 
void endSave ()
 
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

◆ AuthDatabasePostgreSQL()

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

◆ ~AuthDatabasePostgreSQL()

virtual AuthDatabasePostgreSQL::~AuthDatabasePostgreSQL ( )
virtualdefault

Member Function Documentation

◆ createAuth()

virtual bool AuthDatabasePostgreSQL::createAuth ( AuthEntry & authEntry)
virtual

Implements AuthDatabase.

◆ createDatabase()

virtual void AuthDatabasePostgreSQL::createDatabase ( )
protectedvirtual

Implements Database_PostgreSQL.

◆ deleteAuth()

virtual bool AuthDatabasePostgreSQL::deleteAuth ( const std::string & name)
virtual

Implements AuthDatabase.

◆ getAuth()

virtual bool AuthDatabasePostgreSQL::getAuth ( const std::string & name,
AuthEntry & res )
virtual

Implements AuthDatabase.

◆ initStatements()

virtual void AuthDatabasePostgreSQL::initStatements ( )
protectedvirtual

Implements Database_PostgreSQL.

◆ listNames()

virtual void AuthDatabasePostgreSQL::listNames ( std::vector< std::string > & res)
virtual

Implements AuthDatabase.

◆ reload()

virtual void AuthDatabasePostgreSQL::reload ( )
virtual

Implements AuthDatabase.

◆ saveAuth()

virtual bool AuthDatabasePostgreSQL::saveAuth ( const AuthEntry & authEntry)
virtual

Implements AuthDatabase.

◆ verifyDatabase()

virtual void AuthDatabasePostgreSQL::verifyDatabase ( )
inlinevirtual

References Database_PostgreSQL::verifyDatabase().

+ Here is the call graph for this function:

◆ writePrivileges()

virtual void AuthDatabasePostgreSQL::writePrivileges ( const AuthEntry & authEntry)
privatevirtual

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