userver: storages::postgres::Database Class Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
storages::postgres::Database Class Reference

Your opinion will help to improve our service

Leave a feedback >

#include <userver/storages/postgres/database.hpp>

Detailed Description

Object for accessing PostgreSQL database instance (sharded or not)

Definition at line 24 of file database.hpp.

Public Member Functions

ClusterPtr GetCluster () const
 Cluster accessor for default shard number.
 
ClusterPtr GetClusterForShard (size_t shard) const
 Cluster accessor for specific shard number.
 
size_t GetShardCount () const
 Get total shard count.
 
void UpdateClusterDescription (const std::vector< DsnList > &)
 

Member Function Documentation

◆ GetShardCount()

size_t storages::postgres::Database::GetShardCount ( ) const
inline

Get total shard count.

Definition at line 33 of file database.hpp.

Friends And Related Symbol Documentation

◆ components::Postgres

friend class components::Postgres
friend

Definition at line 38 of file database.hpp.


The documentation for this class was generated from the following file: