pg_async
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
tip::db::pg Namespace Reference

Namespaces

 detail
 
 error
 
 io
 
 oids
 
 options
 
 sqlstate
 

Classes

struct  bytea
 Binary data, matches PostgreSQL bytea type. More...
 
struct  dbalias
 Short unique string to refer a database. Signature structure, to pass instead of connection string. More...
 
struct  connection_options
 Postgre connection options. More...
 
struct  field_description
 Description of a field returned by the backend. More...
 
class  db_service
 
class  query
 Asynchronous query class. More...
 
class  resultset
 
class  transaction
 RAII transaction object. More...
 

Typedefs

typedef boost::int_t< 16 >::exact smallint
 2-byte integer, to match PostgreSQL smallint and smallserial types More...
 
typedef boost::uint_t< 16 >::exact usmallint
 2-byte unsigned integer More...
 
typedef boost::int_t< 32 >::exact integer
 4-byte integer, to match PostgreSQL integer and serial types More...
 
typedef boost::uint_t< 32 >::exact uinteger
 4-byte unsigned integer More...
 
typedef boost::int_t< 64 >::exact bigint
 8-byte integer, to match PostgreSQL bigint and bigserial types More...
 
typedef boost::uint_t< 64 >::exact ubigint
 8-byte unsigned integer More...
 
typedef char byte
 1-byte char or byte type. More...
 
template<typename T >
using nullable = boost::optional< T >
 Nullable data type. More...
 
typedef
tip::util::input_iterator_buffer 
field_buffer
 
typedef std::vector
< field_description
row_description_type
 Result set's row description. More...
 
typedef std::map< std::string,
std::string > 
client_options_type
 
typedef std::vector
< oids::type::oid_type
type_oid_sequence
 
typedef std::function< void() > simple_callback
 
typedef std::function< void(error::db_error
const &) > 
error_callback
 Callback for error handling. More...
 
typedef std::function< void(transaction_ptr) > transaction_callback
 Callback for starting a transaction. More...
 
typedef std::function< void(transaction_ptr,
resultset, bool) > 
query_result_callback
 Callback for query results. More...
 
typedef std::function< void(error::query_error
const &) > 
query_error_callback
 Callback for a query error. More...
 
Pointer types
typedef std::shared_ptr
< transaction
transaction_ptr
 
typedef std::shared_ptr
< basic_connection > 
connection_ptr
 

Enumerations

enum  protocol_data_format { TEXT_DATA_FORMAT = 0, BINARY_DATA_FORMAT = 1 }
 

Functions

bool operator== (dbalias const &lhs, std::string const &rhs)
 
std::ostream & operator<< (std::ostream &out, dbalias const &)
 
resultset::row::difference_type operator- (resultset::row const &a, resultset::row const &b)
 

Variables

const integer PROTOCOL_VERSION = (3 << 16)
 PostgreSQL protocol version. More...
 

Typedef Documentation

typedef boost::int_t<64>::exact tip::db::pg::bigint

8-byte integer, to match PostgreSQL bigint and bigserial types

Definition at line 170 of file common.hpp.

typedef char tip::db::pg::byte

1-byte char or byte type.

Definition at line 184 of file common.hpp.

typedef std::map< std::string, std::string > tip::db::pg::client_options_type

Definition at line 345 of file common.hpp.

typedef std::shared_ptr<basic_connection> tip::db::pg::connection_ptr

Definition at line 341 of file common.hpp.

typedef std::function< void (error::db_error const&) > tip::db::pg::error_callback

Callback for error handling.

Definition at line 350 of file common.hpp.

typedef tip::util::input_iterator_buffer tip::db::pg::field_buffer

Definition at line 201 of file common.hpp.

typedef boost::int_t<32>::exact tip::db::pg::integer

4-byte integer, to match PostgreSQL integer and serial types

Definition at line 162 of file common.hpp.

template<typename T >
using tip::db::pg::nullable = typedef boost::optional<T>

Nullable data type.

See Also
Boost::Optional documentation

Definition at line 191 of file common.hpp.

typedef std::function< void (error::query_error const&) > tip::db::pg::query_error_callback

Callback for a query error.

Definition at line 357 of file common.hpp.

typedef std::function< void (transaction_ptr, resultset, bool) > tip::db::pg::query_result_callback

Callback for query results.

Definition at line 355 of file common.hpp.

Result set's row description.

Definition at line 325 of file common.hpp.

typedef std::function< void () > tip::db::pg::simple_callback

Definition at line 348 of file common.hpp.

typedef boost::int_t<16>::exact tip::db::pg::smallint

2-byte integer, to match PostgreSQL smallint and smallserial types

Definition at line 154 of file common.hpp.

typedef std::function< void (transaction_ptr) > tip::db::pg::transaction_callback

Callback for starting a transaction.

Definition at line 352 of file common.hpp.

typedef std::shared_ptr<transaction> tip::db::pg::transaction_ptr

Definition at line 340 of file common.hpp.

Definition at line 346 of file common.hpp.

typedef boost::uint_t<64>::exact tip::db::pg::ubigint

8-byte unsigned integer

Definition at line 174 of file common.hpp.

typedef boost::uint_t<32>::exact tip::db::pg::uinteger

4-byte unsigned integer

Definition at line 166 of file common.hpp.

typedef boost::uint_t<16>::exact tip::db::pg::usmallint

2-byte unsigned integer

Definition at line 158 of file common.hpp.

Enumeration Type Documentation

Protocol format type

Enumerator
TEXT_DATA_FORMAT 

TEXT_DATA_FORMAT.

BINARY_DATA_FORMAT 

BINARY_DATA_FORMAT.

Definition at line 283 of file common.hpp.

Function Documentation

resultset::row::difference_type tip::db::pg::operator- ( resultset::row const &  a,
resultset::row const &  b 
)
inline

Definition at line 705 of file resultset.hpp.

Here is the call graph for this function:

std::ostream& tip::db::pg::operator<< ( std::ostream &  out,
dbalias const &   
)
bool tip::db::pg::operator== ( dbalias const &  lhs,
std::string const &  rhs 
)
inline

Definition at line 239 of file common.hpp.

Variable Documentation

const integer tip::db::pg::PROTOCOL_VERSION = (3 << 16)

PostgreSQL protocol version.

Definition at line 179 of file common.hpp.