8 #ifndef TIP_DB_PG_DATABASE_HPP_
9 #define TIP_DB_PG_DATABASE_HPP_
15 #include <boost/asio.hpp>
16 #include <boost/system/error_code.hpp>
17 #include <boost/optional.hpp>
118 static boost::asio::io_service&
124 typedef std::shared_ptr<detail::database_impl> pimpl;
static void initialize(size_t pool_size, connection_params const &defaults)
Initialize the database service with the default pool_size per alias and default connection parameter...
static const size_t DEFAULT_POOOL_SIZE
static boost::asio::io_service & io_service()
Short unique string to refer a database. Signature structure, to pass instead of connection string...
std::function< void(error::db_error const &) > error_callback
Callback for error handling.
boost::optional< size_t > optional_size
static void begin(dbalias const &, transaction_callback const &, error_callback const &)
Create a connection or retrieve a connection from the connection pool and start a transaction...
boost::system::error_code error_code
static void add_connection(std::string const &connection_string, optional_size pool_size=optional_size())
Add a connection specification.
std::map< std::string, std::string > connection_params
std::function< void(transaction_ptr) > transaction_callback
Callback for starting a transaction.