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/conninfo_option>
|
| conninfo_option (PQconninfoOption *pq_conninfo_option) noexcept |
| Contructor.
|
|
| ~conninfo_option () noexcept |
| Destructor.
|
|
conninfo_option & | at (const char *keyword) |
| Adjust internal pointer to the specified element of the underlying array, and return the same conninfo_option object for immediate element access.
|
|
conninfo_option & | at (const int index) |
| Adjust internal pointer to the specified element of the underlying array, and return the same conninfo_option object for immediate element access.
|
|
bool | exists () noexcept |
| Indicates whether the underlying PQconninfoOption structure is valid (e.g., not a nullptr ), which normally indicates that a PQconninfoOption structure did exist in connection with the instantation of this structure.
|
|
conninfo_option & | final () |
| Adjust internal pointer to the element after the last element of the underlying array.
|
|
bool | find (const char *keyword) noexcept |
| Adjust internal pointer to the specified element of the underlying array.
|
|
bool | first () noexcept |
| Adjust internal pointer to first element of the underlying array.
|
|
bool | has (const char *keyword) noexcept |
| Indicate whether the specified element exists in the underlying array (without updating the internal index).
|
|
bool | is_null () noexcept |
| Indicates whether the underlying PQconninfoOption structure is not valid (e.g., a nullptr ), which normally indicates that a PQconninfoOption did not exist in connection with the instantation of this structure.
|
|
bool | last () noexcept |
| Adjust internal pointer to last element of the underlying array.
|
|
bool | next () |
| Adjust internal pointer to the next element of the underlying array.
|
|
conninfo_option & | operator[] (const int index) |
| Adjust internal pointer to the specified element of the underlying array, and return the same conninfo_option object for immediate element access.
|
|
bool | prev () |
| Adjust internal pointer to the previous element of the underlying array.
|
|
conninfo_option & | reset () |
| Adjust internal pointer to the element before the first element of the underlying array.
|
|
bool | seek (const int index) |
| Adjust internal pointer to the specified element of the underlying array.
|
|
int | size () noexcept |
| Internally, this method iterates through the underlying array to discover the quantity of elements in the underlying PQconninfoOption array, but only if this iteration hasn't already occurred – extra care is taken to only ever iterate the array once, as needed, since its size never changes.
|
|
|
char * | compiled = nullptr |
| Fallback compiled in default value.
|
|
char * | dispchar = nullptr |
| Indicates how to display this field in a connect dialog; values are:
|
|
int | dispsize = 0 |
| Field size in characters for dialog.
|
|
char * | envvar = nullptr |
| Fallback environment variable name.
|
|
char * | keyword = nullptr |
| The keyword of the option.
|
|
char * | label = nullptr |
| Label for field in connect dialog.
|
|
char * | val = nullptr |
| Option's current value, or nullptr .
|
|
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 PQconninfoOption
structure:
typedef struct {
} PQconninfoOption;
char * compiled
Fallback compiled in default value.
Definition conninfo_option:57
char * label
Label for field in connect dialog.
Definition conninfo_option:69
char * keyword
The keyword of the option.
Definition conninfo_option:45
char * envvar
Fallback environment variable name.
Definition conninfo_option:51
char * val
Option's current value, or nullptr.
Definition conninfo_option:63
char * dispchar
Indicates how to display this field in a connect dialog; values are:
Definition conninfo_option:78
int dispsize
Field size in characters for dialog.
Definition conninfo_option:84
This conninfo_option structure includes some additional methods that make it easier to work with the underlying conninfoOption
structure.
- See also
- pq::connection::conndefaults
-
pq::connection::conninfo
-
pq::connection::conninfoParse
◆ conninfo_option()
pq::conninfo_option::conninfo_option |
( |
PQconninfoOption * | pq_conninfo_option | ) |
|
|
inlinenoexcept |
◆ ~conninfo_option()
pq::conninfo_option::~conninfo_option |
( |
| ) |
|
|
inlinenoexcept |
◆ operator[]()
Adjust internal pointer to the specified element of the underlying array, and return the same conninfo_option
object for immediate element access.
- Exceptions
-
std::out_of_range | if the specified element doesn't exist |
- Returns
- The same
conninfo_option
object so as to facilitate stacking, with all public struct attribute pointers and values updated accordingly
- See also
- first
-
last
-
next
-
prev
- Parameters
-
index | Index to load (0 = first element; negative values count backward from the end, wherein -1 = last, -2 = penultimate, etc.) |
◆ at() [1/2]
Adjust internal pointer to the specified element of the underlying array, and return the same conninfo_option
object for immediate element access.
- Exceptions
-
std::out_of_range | if the specified element doesn't exist |
- Returns
- The same
conninfo_option
object so as to facilitate stacking, with all public struct members updated accordingly
- See also
- final
-
find
-
first
-
last
-
next
-
prev
-
reset
-
seek
- Parameters
-
keyword | Keyword to search for (case-sensitive) |
◆ at() [2/2]
Adjust internal pointer to the specified element of the underlying array, and return the same conninfo_option
object for immediate element access.
- Exceptions
-
std::out_of_range | if the specified element doesn't exist |
- Returns
- The same
conninfo_option
object so as to facilitate stacking, with all public struct members updated accordingly
- See also
- final
-
find
-
first
-
last
-
next
-
prev
-
reset
-
seek
- Parameters
-
index | Index to load (0 = first element; negative values count backward from the end, wherein -1 = last, -2 = penultimate, etc.) |
◆ exists()
bool pq::conninfo_option::exists |
( |
| ) |
|
|
inlinenoexcept |
Indicates whether the underlying PQconninfoOption
structure is valid (e.g., not a nullptr
), which normally indicates that a PQconninfoOption
structure did exist in connection with the instantation of this structure.
- Returns
TRUE
= This object represents a valid PQconninfoOption
structure, which means that all the public attributes will be usefully defined
FALSE
= This object does not represent a valid PQconninfoOption
structure, which means that all public attributes pointers will be set to nullptr
and all values will be set to 0
- See also
- has
-
is_null
◆ final()
Adjust internal pointer to the element after the last element of the underlying array.
- Returns
- The same
conninfo_option
object so as to facilitate stacking, with all public struct attribute pointers and values updated accordingly
- See also
- at
-
find
-
first
-
last
-
next
-
prev
-
reset
-
seek
◆ find()
bool pq::conninfo_option::find |
( |
const char * | keyword | ) |
|
|
inlinenoexcept |
Adjust internal pointer to the specified element of the underlying array.
- Returns
TRUE
= element exists and the internal index was updated
FALSE
= element doesn't exist because the index is out of range
- See also
- at
-
final
-
find
-
first
-
has
-
last
-
next
-
prev
-
reset
-
seek
- Parameters
-
keyword | Keyword to search for (case-sensitive) |
◆ first()
bool pq::conninfo_option::first |
( |
| ) |
|
|
inlinenoexcept |
Adjust internal pointer to first element of the underlying array.
- Returns
TRUE
= element exists and the internal index was updated
FALSE
= element doesn't exist because the index is out of range
- See also
- at
-
final
-
find
-
last
-
next
-
prev
-
reset
-
seek
◆ has()
bool pq::conninfo_option::has |
( |
const char * | keyword | ) |
|
|
inlinenoexcept |
Indicate whether the specified element exists in the underlying array (without updating the internal index).
- Returns
TRUE
= element exists
FALSE
= element doesn't exist
- See also
- find
-
seek
- Parameters
-
keyword | Keyword to search for (case-sensitive) |
◆ is_null()
bool pq::conninfo_option::is_null |
( |
| ) |
|
|
inlinenoexcept |
Indicates whether the underlying PQconninfoOption
structure is not valid (e.g., a nullptr
), which normally indicates that a PQconninfoOption
did not exist in connection with the instantation of this structure.
- Returns
TRUE
= This object does not represent a valid PQconninfoOption
structure, 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 PQconninfoOption
structure, which means that all the public attributes will be usefully defined
- See also
- exists
◆ last()
bool pq::conninfo_option::last |
( |
| ) |
|
|
inlinenoexcept |
Adjust internal pointer to last element of the underlying array.
- Returns
TRUE
= element exists and the internal index was updated
FALSE
= element doesn't exist because the index is out of range
- See also
- at
-
final
-
find
-
first
-
next
-
prev
-
reset
-
seek
◆ next()
bool pq::conninfo_option::next |
( |
| ) |
|
|
inline |
Adjust internal pointer to the next element of the underlying array.
- Returns
TRUE
= element exists and the internal index was updated
FALSE
= element doesn't exist because the index is out of range
- See also
- at
-
final
-
find
-
first
-
last
-
prev
-
reset
-
seek
◆ prev()
bool pq::conninfo_option::prev |
( |
| ) |
|
|
inline |
Adjust internal pointer to the previous element of the underlying array.
- Returns
TRUE
= element exists and the internal index was updated
FALSE
= element doesn't exist because the index is out of range
- See also
- at
-
final
-
find
-
first
-
last
-
next
-
reset
-
seek
◆ reset()
Adjust internal pointer to the element before the first element of the underlying array.
- Returns
- The same
conninfo_option
object so as to facilitate stacking, with all public struct attribute pointers and values updated accordingly
- See also
- at
-
final
-
find
-
first
-
last
-
next
-
prev
-
seek
◆ seek()
bool pq::conninfo_option::seek |
( |
const int | index | ) |
|
|
inline |
Adjust internal pointer to the specified element of the underlying array.
- Returns
TRUE
= element exists and the internal index was updated
FALSE
= element doesn't exist because the index is out of range
- See also
- at
-
final
-
find
-
first
-
has
-
last
-
next
-
prev
-
reset
- Parameters
-
index | Index to load (0 = first element; negative values count backward from the end, wherein -1 = last, -2 = penultimate, etc.) |
◆ size()
int pq::conninfo_option::size |
( |
| ) |
|
|
inlinenoexcept |
Internally, this method iterates through the underlying array to discover the quantity of elements in the underlying PQconninfoOption
array, but only if this iteration hasn't already occurred – extra care is taken to only ever iterate the array once, as needed, since its size never changes.
This method always returns 0
if is_null() is true
.
- Returns
- Total number of elements in the underlying
PQconninfoOption
array
◆ keyword
char* pq::conninfo_option::keyword = nullptr |
The keyword of the option.
◆ envvar
char* pq::conninfo_option::envvar = nullptr |
Fallback environment variable name.
◆ compiled
char* pq::conninfo_option::compiled = nullptr |
Fallback compiled in default value.
◆ val
char* pq::conninfo_option::val = nullptr |
Option's current value, or nullptr
.
◆ label
char* pq::conninfo_option::label = nullptr |
Label for field in connect dialog.
◆ dispchar
char* pq::conninfo_option::dispchar = nullptr |
Indicates how to display this field in a connect dialog; values are:
- "" = Display entered value as is
- "`*`" = Password field - hide value
- "`D`" = Debug option - don't show by default
◆ dispsize
int pq::conninfo_option::dispsize = 0 |
Field size in characters for dialog.
The documentation for this struct was generated from the following file: