pg_async
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
datatype_mapping.hpp
Go to the documentation of this file.
1 /*
2  * datatype_mapping.hpp
3  *
4  * Created on: Jul 24, 2015
5  * Author: zmij
6  */
7 
8 #ifndef LIB_PG_ASYNC_INCLUDE_TIP_DB_PG_DATATYPE_MAPPING_HPP_
9 #define LIB_PG_ASYNC_INCLUDE_TIP_DB_PG_DATATYPE_MAPPING_HPP_
10 
12 
13 namespace tip {
14 namespace db {
15 namespace pg {
16 namespace io {
17 
18 namespace traits {
19 
20 template < >
21 struct cpppg_data_mapping< std::string > : detail::data_mapping_base< oids::type::text, std::string > {};
22 
24 template < >
25 struct pgcpp_data_mapping < oids::type::boolean > : detail::data_mapping_base< oids::type::boolean, bool > {};
26 template < >
27 struct cpppg_data_mapping < bool > : detail::data_mapping_base< oids::type::boolean, bool > {};
29 
31 template < >
32 struct pgcpp_data_mapping < oids::type::bytea > : detail::data_mapping_base< oids::type::bytea, bytea > {};
33 template < >
34 struct cpppg_data_mapping < bytea > : detail::data_mapping_base< oids::type::bytea, bytea > {};
36 
38 
39 template < >
40 struct pgcpp_data_mapping < oids::type::int2 > : detail::data_mapping_base< oids::type::int2, smallint > {};
41 template < >
42 struct cpppg_data_mapping < smallint > : detail::data_mapping_base< oids::type::int2, smallint > {};
43 
44 template < >
45 struct pgcpp_data_mapping < oids::type::int4 > : detail::data_mapping_base< oids::type::int4, integer > {};
46 template < >
47 struct cpppg_data_mapping < integer > : detail::data_mapping_base< oids::type::int4, integer > {};
48 
49 template < >
50 struct pgcpp_data_mapping < oids::type::int8 > : detail::data_mapping_base< oids::type::int8, bigint > {};
51 template < >
52 struct cpppg_data_mapping < bigint > : detail::data_mapping_base< oids::type::int8, bigint > {};
54 
56 
57 template < >
58 struct pgcpp_data_mapping < oids::type::oid > : detail::data_mapping_base< oids::type::oid, integer > {};
59 template < >
60 struct pgcpp_data_mapping < oids::type::tid > : detail::data_mapping_base< oids::type::tid, integer > {};
61 template < >
62 struct pgcpp_data_mapping < oids::type::xid > : detail::data_mapping_base< oids::type::xid, integer > {};
63 template < >
64 struct pgcpp_data_mapping < oids::type::cid > : detail::data_mapping_base< oids::type::cid, integer > {};
66 
68 
69 template < >
70 struct pgcpp_data_mapping < oids::type::float4 > : detail::data_mapping_base< oids::type::float4, float > {};
71 template < >
72 struct cpppg_data_mapping < float > : detail::data_mapping_base< oids::type::float4, float > {};
73 
74 template < >
75 struct pgcpp_data_mapping < oids::type::float8 > : detail::data_mapping_base< oids::type::float8, double > {};
76 template < >
77 struct cpppg_data_mapping < double > : detail::data_mapping_base< oids::type::float8, double > {};
79 
80 } // namespace traits
81 } // namespace io
82 } // namespace pg
83 } // namespace db
84 } // namespace tip
85 
86 #endif /* LIB_PG_ASYNC_INCLUDE_TIP_DB_PG_DATATYPE_MAPPING_HPP_ */
boost::int_t< 64 >::exact bigint
8-byte integer, to match PostgreSQL bigint and bigserial types
Definition: common.hpp:170
Template for specifying mapping between a C++ type and PostgreSQL type oid.
boost::int_t< 32 >::exact integer
4-byte integer, to match PostgreSQL integer and serial types
Definition: common.hpp:162
Binary data, matches PostgreSQL bytea type.
Definition: common.hpp:196
Base structure for specifying mapping between C++ data type and PostgreSQL type oid.
boost::int_t< 16 >::exact smallint
2-byte integer, to match PostgreSQL smallint and smallserial types
Definition: common.hpp:154