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

#include <Notify.h>

Public Member Functions

 Notify (Connection &connection, std::string tableName, std::function< void()> &callBack)
 
 ~Notify ()
 

Detailed Description

Listens for PostgreSQL NOTIFY events on a dedicated thread.

Uses its own libpq connection (libpq is not thread-safe), so the passed-in Connection is only used to derive the connection parameters.

Constructor & Destructor Documentation

◆ Notify()

lintel::postgresql::Notify::Notify ( Connection &  connection,
std::string  tableName,
std::function< void()> &  callBack 
)
explicit

Constructs a notify listener.

Parameters
connectionthe PostgreSQL connection
tableNamethe table/channel to listen on
callBackthe callback to invoke on notification

◆ ~Notify()

lintel::postgresql::Notify::~Notify ( )

Destructor, signals shutdown and joins the listener thread.


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