13 #ifndef PQXX_H_NOTIFICATION
14 #define PQXX_H_NOTIFICATION
16 #include "pqxx/compiler-public.hxx"
17 #include "pqxx/internal/compiler-internal-pre.hxx"
21 #include "pqxx/types.hxx"
72 [[nodiscard]] std::string
const &
channel()
const {
return m_channel; }
83 virtual void operator()(std::string
const &payload,
int backend_pid) = 0;
90 std::string m_channel;
94 #include "pqxx/internal/compiler-internal-post.hxx"
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:26
Connection to a database.
Definition: connection.hxx:170
Definition: notification.hxx:56
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.
std::string const & channel() const
The channel that this receiver listens on.
Definition: notification.hxx:72
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:86