13 #ifndef PQXX_NOTIFICATION_HXX
14 #define PQXX_NOTIFICATION_HXX
16 #if !defined(PQXX_HEADER_PRE)
17 # error "Include libpqxx headers as <pqxx/header>, not <pqxx/header.hxx>."
67 [[deprecated(
"Use pqxx::connection::listen() instead.")]]
69 connection &cx, std::string_view channel,
sl loc = sl::current());
81 [[nodiscard]] std::string
const &
channel() const & {
return m_channel; }
91 virtual void operator()(std::string
const &payload,
int backend_pid) = 0;
98 std::string m_channel;
Connection to a database.
Definition: connection.hxx:273
Definition: notification.hxx:60
std::string const & channel() const &
The channel that this receiver listens on.
Definition: notification.hxx:81
notification_receiver & operator=(notification_receiver &&)=delete
notification_receiver(notification_receiver const &)=delete
notification_receiver & operator=(notification_receiver const &)=delete
notification_receiver(notification_receiver &&)=delete
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:94
The home of all libpqxx classes, functions, templates, etc.
Definition: array.cxx:26
std::source_location sl
Convenience alias for std::source_location. It's just too long.
Definition: types.hxx:38