lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
lintel::postgresql::Connection Class Reference

#include <Connection.h>

Public Member Functions

 Connection (const std::string &connectionInfo)
 
 Connection (const std::shared_ptr< DatabaseConnectionEntry > &connectionEntry)
 
 Connection (Connection &connection)=delete
 
bool isHealthy () const
 
 ~Connection ()
 

Friends

class Transaction
 
class Statement
 
class PreparedStatement
 
class Notify
 
class Cursor
 

Detailed Description

PostgreSQL database connection wrapping a PGconn handle.

Constructor & Destructor Documentation

◆ Connection() [1/3]

lintel::postgresql::Connection::Connection ( const std::string &  connectionInfo)
explicit

Constructs a PostgreSQL connection from a connection string.

Parameters
connectionInfothe PostgreSQL connection string

◆ Connection() [2/3]

lintel::postgresql::Connection::Connection ( const std::shared_ptr< DatabaseConnectionEntry > &  connectionEntry)
explicit

Constructs a PostgreSQL connection from a configuration entry.

Parameters
connectionEntrythe database connection configuration entry

◆ Connection() [3/3]

lintel::postgresql::Connection::Connection ( Connection &  connection)
delete

◆ ~Connection()

lintel::postgresql::Connection::~Connection ( )

Destructor, closes the connection.

Member Function Documentation

◆ isHealthy()

bool lintel::postgresql::Connection::isHealthy ( ) const
Returns
true when libpq still reports a usable connection (PQstatus == CONNECTION_OK)

Friends And Related Symbol Documentation

◆ Cursor

◆ Notify

◆ PreparedStatement

◆ Statement

◆ Transaction


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