132 #ifndef TIP_DB_PG_COMMON_HPP_
133 #define TIP_DB_PG_COMMON_HPP_
138 #include <functional>
141 #include <boost/integer.hpp>
142 #include <boost/optional.hpp>
144 #include <tip/util/streambuf.hpp>
190 template <
typename T >
228 return !(*
this == rhs);
241 return lhs.
value == rhs;
331 class basic_connection;
375 operator"" _db(
const char*,
size_t n);
389 operator"" _pg(
const char*,
size_t);
std::vector< byte > container_type
boost::int_t< 64 >::exact bigint
8-byte integer, to match PostgreSQL bigint and bigserial types
std::shared_ptr< basic_connection > connection_ptr
Short unique string to refer a database. Signature structure, to pass instead of connection string...
std::shared_ptr< transaction > transaction_ptr
tip::util::input_iterator_buffer field_buffer
const integer PROTOCOL_VERSION
PostgreSQL protocol version.
boost::optional< T > nullable
Nullable data type.
std::function< void(error::db_error const &) > error_callback
Callback for error handling.
smallint type_size
The data type size (see pg_type.typlen). Note that negative values denote variable-width types...
const std::string CLIENT_ENCODING
std::ostream & operator<<(std::ostream &out, dbalias const &)
boost::int_t< 32 >::exact integer
4-byte integer, to match PostgreSQL integer and serial types
integer type_mod
The type modifier (see pg_attribute.atttypmod). The meaning of the modifier is type-specific.
bool operator<(dbalias const &rhs) const
static connection_options parse(std::string const &)
boost::uint_t< 64 >::exact ubigint
8-byte unsigned integer
smallint attribute_number
If the field can be identified as a column of a specific table, the attribute number of the column; o...
bool operator==(dbalias const &rhs) const
protocol_data_format format_code
The format code being used for the field. Currently will be zero (text) or one (binary). In a RowDescription returned from the statement variant of Describe, the format code is not yet known and will always be zero.
const std::string DATABASE
boost::uint_t< 16 >::exact usmallint
2-byte unsigned integer
Postgre connection options.
std::map< std::string, std::string > client_options_type
integer table_oid
If the field can be identified as a column of a specific table, the object ID of the table; otherwise...
An error generated by the PostgreSQL server when executing a query.
std::function< void(error::query_error const &) > query_error_callback
Callback for a query error.
boost::uint_t< 32 >::exact uinteger
4-byte unsigned integer
Binary data, matches PostgreSQL bytea type.
boost::int_t< 16 >::exact smallint
2-byte integer, to match PostgreSQL smallint and smallserial types
Description of a field returned by the backend.
oids::type::oid_type type_oid
The object ID of the field's data type.
Base class for exceptions generated by the library.
std::string name
The field name.
void swap(std::string &rhs)
char byte
1-byte char or byte type.
std::vector< field_description > row_description_type
Result set's row description.
const std::string APPLICATION_NAME
bool operator==(dbalias const &lhs, std::string const &rhs)
bool operator!=(dbalias const &rhs) const
std::vector< oids::type::oid_type > type_oid_sequence
Connection with the database server failure. Includes network and authentication failures.
std::function< void() > simple_callback
std::function< void(transaction_ptr, resultset, bool) > query_result_callback
Callback for query results.
std::function< void(transaction_ptr) > transaction_callback
Callback for starting a transaction.