userver: userver/storages/postgres/postgres.hpp Source File
Loading...
Searching...
No Matches
postgres.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/storages/postgres/postgres.hpp
4/// This file is mainly for documentation purposes and inclusion of all headers
5/// that are required for working with PostgreSQL userver component.
6
7#include <userver/storages/postgres/cluster.hpp>
8#include <userver/storages/postgres/component.hpp>
9#include <userver/storages/postgres/exceptions.hpp>
10#include <userver/storages/postgres/result_set.hpp>
11#include <userver/storages/postgres/transaction.hpp>
12
13/// @page pg_driver uPg Driver
14///
15/// 🐙 **userver** provides access to PostgreSQL database servers via
16/// components::Postgres. The uPg driver is asynchronous, it suspends
17/// current coroutine for carrying out network I/O.
18///
19/// @section features Features
20/// - PostgreSQL cluster topology discovery;
21/// - Manual cluster sharding (access to shard clusters by index);
22/// - Connection pooling;
23/// - Queries are transparently converted to prepared statements to use less
24/// network on next execution, give the database more optimization freedom,
25/// avoid the need for parameters escaping as the latter are now send
26/// separately from the query;
27/// - Automatic PgaaS topology discovery;
28/// - Selecting query target (master/slave);
29/// - Connection failover;
30/// - Transaction support;
31/// - Variadic template query parameter passing;
32/// - Query result extraction to C++ types;
33/// - Binary protocol usage for communication;
34/// - Portals for effective background cache updates;
35/// - Queries pipelining;
36/// - Mapping PostgreSQL user types to C++ types;
37/// - @ref scripts/docs/en/userver/deadline_propagation.md .
38///
39/// @section toc More information
40/// - For configuration see components::Postgres
41/// - For cluster topology see storages::postgres::Cluster
42/// - @ref pg_transactions
43/// - @ref pg_run_queries
44/// - @ref pg_process_results
45/// - @ref pg_types
46/// - @ref pg_user_types
47/// - @ref pg_errors
48/// - @ref pg_topology
49///
50/// ----------
51///
52/// @htmlonly <div class="bottom-nav"> @endhtmlonly
53/// ⇦ @ref scripts/docs/en/userver/lru_cache.md | @ref pg_transactions ⇨
54/// @htmlonly </div> @endhtmlonly
55
56USERVER_NAMESPACE_BEGIN
57
58namespace storages {
59/// @brief Top namespace for uPg driver
60///
61/// For more information see @ref pg_driver
62namespace postgres {
63/// @brief uPg input-output.
64///
65/// Namespace containing classes and functions for defining datatype
66/// input-output and specifying mapping between C++ and PostgreSQL types.
67namespace io {
68/// @brief uPg input-output traits.
69///
70/// Namespace with metafunctions detecting different type traits needed for
71/// PostgreSQL input-output operations
72namespace traits {} // namespace traits
73} // namespace io
74} // namespace postgres
75} // namespace storages
76
77USERVER_NAMESPACE_END