|
libpqxx
The C++ client library for PostgreSQL
|
#include <cstddef>#include <ctime>#include <functional>#include <initializer_list>#include <list>#include <map>#include <memory>#include <optional>#include <string_view>#include <tuple>#include <utility>#include "pqxx/errorhandler.hxx"#include "pqxx/except.hxx"#include "pqxx/internal/concat.hxx"#include "pqxx/params.hxx"#include "pqxx/separated_list.hxx"#include "pqxx/strconv.hxx"#include "pqxx/types.hxx"#include "pqxx/util.hxx"#include "pqxx/zview.hxx"#include "pqxx/internal/ignore-deprecated-pre.hxx"#include "pqxx/internal/ignore-deprecated-post.hxx"Go to the source code of this file.
Classes | |
| struct | pqxx::notification |
| An incoming notification. More... | |
Namespaces | |
| namespace | pqxx |
| The home of all libpqxx classes, functions, templates, etc. | |
| namespace | pqxx::internal |
| Internal items for libpqxx' own use. Do not use these yourself. | |
| namespace | pqxx::internal::gate |
Macros | |
| #define | PQXX_IGNORING_DEPRECATED |
| #define | PQXX_IGNORING_DEPRECATED |
| #define | PQXX_IGNORING_DEPRECATED |
Typedefs | |
| using | pqxx::table_path = std::initializer_list<std::string_view> |
| Representation of a PostgreSQL table path. | |
| using | pqxx::connection_base = connection |
Enumerations | |
| enum | pqxx::skip_init : int { pqxx::nothing , pqxx::openssl , pqxx::crypto } |
| Flags for skipping initialisation of SSL-related libraries. More... | |
| enum class | pqxx::error_verbosity : int { pqxx::terse = 0 , pqxx::normal = 1 , pqxx::verbose = 2 } |
| Error verbosity levels. More... | |
Functions | |
| pqxx::internal::__attribute__ ((visibility("default"))) skip_init_ssl(int skips) noexcept | |
| Control OpenSSL/crypto library initialisation. | |
| template<skip_init... SKIP> | |
| void | pqxx::skip_init_ssl () noexcept |
| Control initialisation of OpenSSL and libcrypto libraries. | |
| class | pqxx::__attribute__ ((visibility("default"))) array_parser |
| Low-level parser for C++ arrays. | |
| std::string | pqxx::encrypt_password (zview user, zview password) |
| Encrypt password. | |
Variables | |
| std::string char const | pqxx::password [] |
| struct pqxx::notification |
An incoming notification.
PostgreSQL extends SQL with a "message bus" using the LISTEN and NOTIFY commands. In libpqxx you use connection::listen() and (optionally) transaction_base::notify().
When you receive a notification for which you have been listening, your handler receives it in the form of a notification object.
| Class Members | ||
|---|---|---|
| int | backend_pid |
Process ID of the backend that sent the notification. This can be useful in situations where a multiple clients are listening on the same channel, and also send notifications on it. In those situations, it often makes sense for a client to ignore its own incoming notifications, but handle all others on the same channel in some way. To check for that, compare this process ID to the return value of the connection's backendpid(). |
| zview | channel |
Channel name. The notification logic will only pass the notification to a handler which was registered to listen on this exact name. |
| connection & | conn |
The connection which received the notification. There will be no backend transaction active on the connection when your handler gets called, but there may be a nontransaction. (This is a special transaction type in libpqxx which does not start a transaction on the backend.) |
| zview | payload |
Optional payload text. If the notification did not carry a payload, the string will be empty. |
| #define PQXX_IGNORING_DEPRECATED |
| #define PQXX_IGNORING_DEPRECATED |
| #define PQXX_IGNORING_DEPRECATED |