userver: storages::postgres::UserTypes Class Reference
Loading...
Searching...
No Matches
storages::postgres::UserTypes Class Reference

#include <userver/storages/postgres/io/user_types.hpp>

Detailed Description

Container for connection-specific user data types.

Definition at line 39 of file user_types.hpp.

Public Types

using CompositeFieldDefs = std::vector<CompositeFieldDef>

Public Member Functions

 UserTypes (const UserTypes &)=delete
 UserTypes (UserTypes &&) noexcept=default
UserTypes & operator= (const UserTypes &)=delete
UserTypes & operator= (UserTypes &&) noexcept=default
void Reset ()
Oid FindOid (DBTypeName) const
Oid FindArrayOid (DBTypeName) const
Oid FindElementOid (Oid) const
DBTypeName FindName (Oid) const
DBTypeName FindBaseName (Oid) const
Oid FindBaseOid (Oid) const
Oid FindBaseOid (DBTypeName) const
Oid FindDomainBaseOid (Oid) const
bool HasParser (Oid) const
io::BufferCategory GetBufferCategory (Oid) const
const io::TypeBufferCategory & GetTypeBufferCategories () const
void AddType (DBTypeDescription &&desc)
void AddCompositeFields (CompositeFieldDefs &&defs)
const CompositeTypeDescriptionGetCompositeDescription (Oid) const
const DBTypeDescriptionGetTypeDescription (Oid) const
void CheckRegisteredTypes () const

Member Typedef Documentation

◆ CompositeFieldDefs

using storages::postgres::UserTypes::CompositeFieldDefs = std::vector<CompositeFieldDef>

Definition at line 41 of file user_types.hpp.

Member Function Documentation

◆ CheckRegisteredTypes()

void storages::postgres::UserTypes::CheckRegisteredTypes ( ) const
Exceptions
UserTypeErrorif not all registered cpp types are added

◆ FindBaseName()

DBTypeName storages::postgres::UserTypes::FindBaseName ( Oid ) const

Find name of the base type for a domain or element type for an array. For the rest of types returns the name for the oid if found.

◆ FindBaseOid()

Oid storages::postgres::UserTypes::FindBaseOid ( Oid ) const

Find base oid for a domain or element type for an array. For the rest of types returns the oid itself.

◆ FindDomainBaseOid()

Oid storages::postgres::UserTypes::FindDomainBaseOid ( Oid ) const

Find base oid for a domain. For the rest of types returns the oid itself.

◆ FindElementOid()

Oid storages::postgres::UserTypes::FindElementOid ( Oid ) const

Find element type oid for an array type. Returns invalid oid if the type is not an array or the type is not found

◆ GetTypeDescription()

const DBTypeDescription * storages::postgres::UserTypes::GetTypeDescription ( Oid ) const

Get type description by oid. May return nullptr if the type was not loaded from the database


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