Distributed Cache
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PostgresDataConnector Class Reference

#include <postgres_data_connector.h>

Inheritance diagram for PostgresDataConnector:
Inheritance graph
Collaboration diagram for PostgresDataConnector:
Collaboration graph

Public Member Functions

 PostgresDataConnector (std::string database, std::string username="postgres", std::string password="postgres", std::string ip="127.0.0.1", int port=5432)
 
int get (std::string container, int key)
 
void put (std::string container, int key, int value)
 
void erase (std::string container, int key)
 
void createContainer (std::string container)
 
void reset ()
 
 ~PostgresDataConnector ()
 
- Public Member Functions inherited from DataConnectorInterface
virtual ~DataConnectorInterface ()
 

Private Member Functions

void getConnection ()
 

Private Attributes

pqxx::connection * c
 
std::string ip
 
int port
 
std::string username
 
std::string password
 
std::string database
 

Constructor & Destructor Documentation

◆ PostgresDataConnector()

PostgresDataConnector::PostgresDataConnector ( std::string  database,
std::string  username = "postgres",
std::string  password = "postgres",
std::string  ip = "127.0.0.1",
int  port = 5432 
)
inline
Here is the call graph for this function:

◆ ~PostgresDataConnector()

PostgresDataConnector::~PostgresDataConnector ( )

Member Function Documentation

◆ createContainer()

void PostgresDataConnector::createContainer ( std::string  container)
virtual

◆ erase()

void PostgresDataConnector::erase ( std::string  container,
int  key 
)
virtual

◆ get()

int PostgresDataConnector::get ( std::string  container,
int  key 
)
virtual

◆ getConnection()

void PostgresDataConnector::getConnection ( )
private
Here is the caller graph for this function:

◆ put()

void PostgresDataConnector::put ( std::string  container,
int  key,
int  value 
)
virtual

◆ reset()

void PostgresDataConnector::reset ( )
virtual

Member Data Documentation

◆ c

pqxx::connection* PostgresDataConnector::c
private

◆ database

std::string PostgresDataConnector::database
private

◆ ip

std::string PostgresDataConnector::ip
private

◆ password

std::string PostgresDataConnector::password
private

◆ port

int PostgresDataConnector::port
private

◆ username

std::string PostgresDataConnector::username
private

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