randolf.ca  1.00
Randolf Richardson's C++ classes
Loading...
Searching...
No Matches
pq::notify Struct Reference

PGnotify structure that doesn't need to be freed because the destructor takes care of releasing memory/resources internally as needed when this object goes out of scope. More...

#include <pq/notify>

+ Collaboration diagram for pq::notify:

Public Member Functions

 notify (PGnotify *pg_notify)
 Contructor.
 
 ~notify ()
 Destructor.
 
bool exists ()
 Indicates whether the underlying PGnotify structure is valid (e.g., not a nullptr), which normally indicates that a notification did exist in connection with the instantation of this structure.
 
bool is_null ()
 Indicates whether the underlying PGnotify structure is not valid (e.g., a nullptr), which normally indicates that a notification did not exist in connection with the instantation of this structure.
 

Public Attributes

int be_pid = 0
 Process ID of notifying PostgreSQL server process.
 
char * extra = nullptr
 Payload string.
 
char * relname = nullptr
 Channel name (do not assume this is the name of the table, trigger, etc., that was the progenitor of this notification).
 

Detailed Description

PGnotify structure that doesn't need to be freed because the destructor takes care of releasing memory/resources internally as needed when this object goes out of scope.

The public attributes in this class are the same as the public attributes provided by the PGnotify structure:

typedef struct pgNotify {
char* relname; // Channel name
int be_pid; // Process ID of notifying server process
char* extra; // Payload string
} PGnotify;
char * extra
Payload string.
Definition notify:43
int be_pid
Process ID of notifying PostgreSQL server process.
Definition notify:37
char * relname
Channel name (do not assume this is the name of the table, trigger, etc., that was the progenitor of ...
Definition notify:31
See also
pq::connection::notifies

Constructor & Destructor Documentation

◆ notify()

pq::notify::notify ( PGnotify * pg_notify)
inline

Contructor.

See also
pq::connection::notifies
Parameters
pg_notifyPointer to PGnotify structure

◆ ~notify()

pq::notify::~notify ( )
inline

Destructor.

Member Function Documentation

◆ exists()

bool pq::notify::exists ( )
inline

Indicates whether the underlying PGnotify structure is valid (e.g., not a nullptr), which normally indicates that a notification did exist in connection with the instantation of this structure.

Returns
TRUE = This object represents a single notification, which means that all the public attributes will be usefully defined
FALSE = This object does not represent any notification, which means that all public attributes pointers will be set to nullptr and all values will be set to 0
See also
is_null

◆ is_null()

bool pq::notify::is_null ( )
inline

Indicates whether the underlying PGnotify structure is not valid (e.g., a nullptr), which normally indicates that a notification did not exist in connection with the instantation of this structure.

Returns
TRUE = This object does not represent any notification, which means that all public attributes pointers will be set to nullptr and all values will be set to 0
FALSE = This object represents a single notification, which means that all the public attributes will be usefully defined
See also
exists

Member Data Documentation

◆ relname

char* pq::notify::relname = nullptr

Channel name (do not assume this is the name of the table, trigger, etc., that was the progenitor of this notification).

◆ be_pid

int pq::notify::be_pid = 0

Process ID of notifying PostgreSQL server process.

◆ extra

char* pq::notify::extra = nullptr

Payload string.


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