pg_async
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Typedefs | Enumerations | Functions
protocol_io_traits.hpp File Reference
#include <string>
#include <istream>
#include <ostream>
#include <sstream>
#include <type_traits>
#include <boost/optional.hpp>
#include <tip/db/pg/common.hpp>
#include <tip/db/pg/pg_types.hpp>
#include <tip/util/streambuf.hpp>
#include <tip/db/pg/protocol_io_traits.inl>
#include <tip/db/pg/datatype_mapping.hpp>
Include dependency graph for protocol_io_traits.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tip::db::pg::io::detail::protocol_binary_selector< T >
 Metafunction for specifying binary procotocol type. More...
 
struct  tip::db::pg::io::detail::protocol_binary_selector< smallint >
 
struct  tip::db::pg::io::detail::protocol_binary_selector< usmallint >
 
struct  tip::db::pg::io::detail::protocol_binary_selector< integer >
 
struct  tip::db::pg::io::detail::protocol_binary_selector< uinteger >
 
struct  tip::db::pg::io::detail::protocol_binary_selector< bigint >
 
struct  tip::db::pg::io::detail::protocol_binary_selector< ubigint >
 
struct  tip::db::pg::io::detail::protocol_binary_selector< float >
 
struct  tip::db::pg::io::detail::protocol_binary_selector< double >
 
struct  tip::db::pg::io::protocol_parser< T, protocol_data_format >
 
struct  tip::db::pg::io::protocol_formatter< T, protocol_data_format >
 
struct  tip::db::pg::io::protocol_io_traits< T, F >
 I/O Traits structure. More...
 
struct  tip::db::pg::io::detail::parser_base< T >
 Base template struct for a data parser. More...
 
struct  tip::db::pg::io::detail::formatter_base< T >
 Base template struct for a data formatter. More...
 
struct  tip::db::pg::io::detail::binary_data_parser< T, TYPE >
 Base structure for a binary data parser. Has no definition. More...
 
struct  tip::db::pg::io::detail::binary_data_parser< T, INTEGRAL >
 Specification of a binary parser for integral values. More...
 
struct  tip::db::pg::io::detail::binary_data_formatter< T, TYPE >
 Base structure for a binary data formatter. Has no definition. More...
 
struct  tip::db::pg::io::detail::binary_data_formatter< T, INTEGRAL >
 Specification of a binary formatter for integral values. More...
 
struct  tip::db::pg::io::detail::data_mapping_base< TypeOid, T >
 Base structure for specifying mapping between C++ data type and PostgreSQL type oid. More...
 
struct  tip::db::pg::io::traits::pgcpp_data_mapping< TypeOid >
 
struct  tip::db::pg::io::traits::cpppg_data_mapping< T >
 Template for specifying mapping between a C++ type and PostgreSQL type oid. More...
 
struct  tip::db::pg::io::traits::has_input_operator< T >
 
struct  tip::db::pg::io::traits::has_output_operator< T >
 
struct  tip::db::pg::io::traits::has_parser< T, format >
 
struct  tip::db::pg::io::traits::has_parser< T, TEXT_DATA_FORMAT >
 
struct  tip::db::pg::io::traits::has_parser< smallint, BINARY_DATA_FORMAT >
 
struct  tip::db::pg::io::traits::has_parser< integer, BINARY_DATA_FORMAT >
 
struct  tip::db::pg::io::traits::has_parser< bigint, BINARY_DATA_FORMAT >
 
struct  tip::db::pg::io::traits::has_formatter< T, format >
 
struct  tip::db::pg::io::traits::has_formatter< T, TEXT_DATA_FORMAT >
 
struct  tip::db::pg::io::traits::has_formatter< smallint, BINARY_DATA_FORMAT >
 
struct  tip::db::pg::io::traits::has_formatter< integer, BINARY_DATA_FORMAT >
 
struct  tip::db::pg::io::traits::has_formatter< bigint, BINARY_DATA_FORMAT >
 
struct  tip::db::pg::io::traits::___no_inout_test
 
struct  tip::db::pg::io::traits::best_parser< T >
 Template parser selector. More...
 
struct  tip::db::pg::io::traits::best_formatter< T >
 Template formatter selector. More...
 
struct  tip::db::pg::io::protocol_formatter< T, TEXT_DATA_FORMAT >
 Generic implementation of a formatter for text data format. More...
 
struct  tip::db::pg::io::protocol_parser< T, TEXT_DATA_FORMAT >
 
struct  tip::db::pg::io::protocol_formatter< T, BINARY_DATA_FORMAT >
 
struct  tip::db::pg::io::protocol_parser< T, BINARY_DATA_FORMAT >
 
struct  tip::db::pg::io::protocol_parser< std::string, TEXT_DATA_FORMAT >
 Protocol parser specialization for std::string, text data format. More...
 
struct  tip::db::pg::io::protocol_formatter< std::string, TEXT_DATA_FORMAT >
 
struct  tip::db::pg::io::protocol_parser< bool, TEXT_DATA_FORMAT >
 Protocol parser specialization for bool, text data format. More...
 
struct  tip::db::pg::io::protocol_parser< bool, BINARY_DATA_FORMAT >
 Protocol parser specialization for bool, binary data format. More...
 
struct  tip::db::pg::io::traits::has_parser< bool, BINARY_DATA_FORMAT >
 
struct  tip::db::pg::io::protocol_parser< boost::optional< T >, TEXT_DATA_FORMAT >
 Protocol parser specialization for boost::optional (used for nullable types), text data format. More...
 
struct  tip::db::pg::io::protocol_parser< boost::optional< T >, BINARY_DATA_FORMAT >
 Protocol parser specialization for boost::optional (used for nullable types), binary data format. More...
 
struct  tip::db::pg::io::protocol_parser< bytea, TEXT_DATA_FORMAT >
 Protocol parser specialization for bytea (binary string), text data format. More...
 
struct  tip::db::pg::io::protocol_parser< bytea, BINARY_DATA_FORMAT >
 Protocol parser specialization for bytea (binary string), binary data format. More...
 

Namespaces

 tip
 
 tip::db
 
 tip::db::pg
 
 tip::db::pg::io
 
 tip::db::pg::io::detail
 
 tip::db::pg::io::traits
 

Typedefs

typedef std::integral_constant
< protocol_binary_type, OTHER > 
tip::db::pg::io::detail::other_binary_type
 Types other then integral or floating point. Require explicit specialization of a binary data parser. More...
 
typedef std::integral_constant
< protocol_binary_type,
INTEGRAL > 
tip::db::pg::io::detail::integral_binary_type
 Integral datatypes. Selects binary parser specialization with network byte order conversion. More...
 
typedef std::integral_constant
< protocol_binary_type,
FLOATING_POINT > 
tip::db::pg::io::detail::floating_point_binary_type
 Floating point datatypes. Binary parser is not implemented yet. More...
 

Enumerations

enum  tip::db::pg::io::protocol_binary_type { tip::db::pg::io::OTHER, tip::db::pg::io::INTEGRAL, tip::db::pg::io::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 
tip::db::pg::io::protocol_reader (T &value)
 Helper function to create a protocol parser. More...
 
template<protocol_data_format F, typename T , typename InputIterator >
InputIterator tip::db::pg::io::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 
tip::db::pg::io::protocol_writer (T const &value)
 Helper function to create a protocol formatter. More...
 
template<protocol_data_format F, typename T >
bool tip::db::pg::io::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 tip::db::pg::io::protocol_write (OutputIterator out, T const &value)
 Write a value to a buffer using an output iterator. More...
 
void tip::db::pg::io::traits::register_binary_parser (oids::type::oid_type id)
 Mark a type oid that it has a binary parser, so that pg_async can request data in binary format. More...
 
bool tip::db::pg::io::traits::has_binary_parser (oids::type::oid_type id)
 Check if there is a binary parser for the specified oid. More...