pg_async
|
Namespaces | |
detail | |
traits | |
Classes | |
struct | protocol_parser |
struct | protocol_formatter |
struct | protocol_io_traits |
I/O Traits structure. More... | |
struct | protocol_formatter< T, TEXT_DATA_FORMAT > |
Generic implementation of a formatter for text data format. More... | |
struct | protocol_parser< T, TEXT_DATA_FORMAT > |
struct | protocol_formatter< T, BINARY_DATA_FORMAT > |
struct | protocol_parser< T, BINARY_DATA_FORMAT > |
struct | protocol_parser< std::string, TEXT_DATA_FORMAT > |
Protocol parser specialization for std::string, text data format. More... | |
struct | protocol_formatter< std::string, TEXT_DATA_FORMAT > |
struct | protocol_parser< bool, TEXT_DATA_FORMAT > |
Protocol parser specialization for bool, text data format. More... | |
struct | protocol_parser< bool, BINARY_DATA_FORMAT > |
Protocol parser specialization for bool, binary data format. More... | |
struct | protocol_parser< boost::optional< T >, TEXT_DATA_FORMAT > |
Protocol parser specialization for boost::optional (used for nullable types), text data format. More... | |
struct | protocol_parser< boost::optional< T >, BINARY_DATA_FORMAT > |
Protocol parser specialization for boost::optional (used for nullable types), binary data format. More... | |
struct | protocol_parser< bytea, TEXT_DATA_FORMAT > |
Protocol parser specialization for bytea (binary string), text data format. More... | |
struct | protocol_parser< bytea, BINARY_DATA_FORMAT > |
Protocol parser specialization for bytea (binary string), binary data format. More... | |
Enumerations | |
enum | protocol_binary_type { OTHER, INTEGRAL, FLOATING_POINT } |
Enumeration for binary parser/formatter template selection. More... | |
Functions | |
template<protocol_data_format F, typename T > | |
protocol_io_traits< T, F > ::parser_type | protocol_reader (T &value) |
Helper function to create a protocol parser. More... | |
template<protocol_data_format F, typename T , typename InputIterator > | |
InputIterator | protocol_read (InputIterator begin, InputIterator end, T &value) |
Read value from input buffer. More... | |
template<protocol_data_format F, typename T > | |
protocol_io_traits< T, F > ::formatter_type | protocol_writer (T const &value) |
Helper function to create a protocol formatter. More... | |
template<protocol_data_format F, typename T > | |
bool | protocol_write (std::vector< byte > &buffer, T const &value) |
Write value to a buffer. More... | |
template<protocol_data_format F, typename T , typename OutputIterator > | |
bool | protocol_write (OutputIterator out, T const &value) |
Write a value to a buffer using an output iterator. More... | |
Enumeration for binary parser/formatter template selection.
Definition at line 32 of file protocol_io_traits.hpp.
InputIterator tip::db::pg::io::protocol_read | ( | InputIterator | begin, |
InputIterator | end, | ||
T & | value | ||
) |
Read value from input buffer.
Deduces a parser using protocol_io_traits for the type and protocol and uses it to read a value from the buffer specified by the pair of iterators
begin | Iterator to start of buffer |
end | Iterator beyond the end of buffer |
value | variable to read into |
F | Protocol data format |
T | Data type to read |
InputIterator | Buffer iterator type |
Definition at line 127 of file protocol_io_traits.hpp.
protocol_io_traits< T, F >::parser_type tip::db::pg::io::protocol_reader | ( | T & | value | ) |
Helper function to create a protocol parser.
Deduces datatype by the function argument and returns a data parser using protocol_io_traits.
value |
Definition at line 105 of file protocol_io_traits.hpp.
bool tip::db::pg::io::protocol_write | ( | std::vector< byte > & | buffer, |
T const & | value | ||
) |
Write value to a buffer.
Deduces a formatter using protocol_io_traits for the type and protocol and uses it to write the value to the buffer
buffer | target data buffer |
value |
F | data format |
T | data type |
Definition at line 162 of file protocol_io_traits.hpp.
bool tip::db::pg::io::protocol_write | ( | OutputIterator | out, |
T const & | value | ||
) |
Write a value to a buffer using an output iterator.
Deduces a formatter using protocol_io_traits for the type and protocol and uses it to write the value to the output iterator.
out | output iterator |
value | value to output |
Definition at line 179 of file protocol_io_traits.hpp.
protocol_io_traits< T, F >::formatter_type tip::db::pg::io::protocol_writer | ( | T const & | value | ) |
Helper function to create a protocol formatter.
Deduces datatype by the function argument and returns a data formatter using protocol_io_traits.
value |
Definition at line 143 of file protocol_io_traits.hpp.