13 #ifndef PQXX_H_NOTIFICATION
14 #define PQXX_H_NOTIFICATION
16 #if !defined(PQXX_HEADER_PRE)
17 # error "Include libpqxx headers as <pqxx/header>, not <pqxx/header.hxx>."
22 #include "pqxx/types.hxx"
73 [[nodiscard]] std::string
const &
channel() const & {
return m_channel; }
84 virtual void operator()(std::string
const &payload,
int backend_pid) = 0;
91 std::string m_channel;
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:33
Connection to a database.
Definition: connection.hxx:233
Definition: notification.hxx:57
std::string const & channel() const &
The channel that this receiver listens on.
Definition: notification.hxx:73
notification_receiver(notification_receiver const &)=delete
Register the receiver with a connection.
notification_receiver & operator=(notification_receiver const &)=delete
Register the receiver with a connection.
virtual void operator()(std::string const &payload, int backend_pid)=0
Overridable: action to invoke when notification arrives.
connection & conn() const noexcept
Definition: notification.hxx:87