userver: storages::postgres::DBTypeDescription Struct Reference
Loading...
Searching...
No Matches
storages::postgres::DBTypeDescription Struct Reference

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

Detailed Description

Description of a PostgreSQL type. The structure is selected from the pg_catalog.pg_type table (not all, only appropriate fields). See https://www.postgresql.org/docs/12/catalog-pg-type.html.

Definition at line 67 of file pg_types.hpp.

Classes

struct  NameHash
 
struct  NamesEqual
 
struct  TypeCategoryHash
 

Public Types

enum class  TypeClass : char {
  kUnknown = 'X' ,
  kBase = 'b' ,
  kComposite = 'c' ,
  kDomain = 'd' ,
  kEnum = 'e' ,
  kPseudo = 'p' ,
  kRange = 'r'
}
 
enum class  TypeCategory : char {
  kInvalid = 0 ,
  kArray = 'A' ,
  kBoolean = 'B' ,
  kComposite = 'C' ,
  kDatetime = 'D' ,
  kEnumeration = 'E' ,
  kGeometric = 'G' ,
  kNetwork = 'I' ,
  kNumeric = 'N' ,
  kPseudotype = 'P' ,
  kRange = 'R' ,
  kString = 'S' ,
  kTimespan = 'T' ,
  kUser = 'U' ,
  kBitstring = 'V' ,
  kUnknown = 'X'
}
 PosgtreSQL type category. See https://www.postgresql.org/docs/12/catalog-pg-type.html#CATALOG-TYPCATEGORY-TABLE. More...
 

Public Member Functions

DBTypeName GetName () const
 
std::size_t GetNameHash () const
 

Public Attributes

Oid oid {kInvalidOid}
 pg_type.oid
 
std::string schema
 pg_namespace.nspname
 
std::string name
 pg_type.typname
 
Integer length {0}
 pg_type.typlen
 
TypeClass type_class {TypeClass::kUnknown}
 pg_type.typtype
 
TypeCategory category {TypeCategory::kInvalid}
 pg_type.typcategory
 
Oid relation_id {kInvalidOid}
 pg_type.typrelid
 
Oid element_type {kInvalidOid}
 
Oid array_type {kInvalidOid}
 pg_type.typarray
 
Oid base_type {kInvalidOid}
 
bool not_null {false}
 

Member Enumeration Documentation

◆ TypeCategory

◆ TypeClass

enum class storages::postgres::DBTypeDescription::TypeClass : char
strong

Definition at line 68 of file pg_types.hpp.

Member Function Documentation

◆ GetName()

DBTypeName storages::postgres::DBTypeDescription::GetName ( ) const
inline

Definition at line 128 of file pg_types.hpp.

Member Data Documentation

◆ array_type

Oid storages::postgres::DBTypeDescription::array_type {kInvalidOid}

pg_type.typarray

Definition at line 119 of file pg_types.hpp.

◆ base_type

Oid storages::postgres::DBTypeDescription::base_type {kInvalidOid}

pg_type.typbasetype Base type for domains

Definition at line 122 of file pg_types.hpp.

◆ category

TypeCategory storages::postgres::DBTypeDescription::category {TypeCategory::kInvalid}

pg_type.typcategory

Definition at line 112 of file pg_types.hpp.

◆ element_type

Oid storages::postgres::DBTypeDescription::element_type {kInvalidOid}

pg_type.typelem If not zero, this type is an array

Definition at line 117 of file pg_types.hpp.

◆ length

Integer storages::postgres::DBTypeDescription::length {0}

pg_type.typlen

Definition at line 108 of file pg_types.hpp.

◆ name

std::string storages::postgres::DBTypeDescription::name

pg_type.typname

Definition at line 106 of file pg_types.hpp.

◆ not_null

bool storages::postgres::DBTypeDescription::not_null {false}

pg_type.typnotnull Used only with domains

Definition at line 125 of file pg_types.hpp.

◆ oid

Oid storages::postgres::DBTypeDescription::oid {kInvalidOid}

pg_type.oid

Definition at line 102 of file pg_types.hpp.

◆ relation_id

Oid storages::postgres::DBTypeDescription::relation_id {kInvalidOid}

pg_type.typrelid

Definition at line 114 of file pg_types.hpp.

◆ schema

std::string storages::postgres::DBTypeDescription::schema

pg_namespace.nspname

Definition at line 104 of file pg_types.hpp.

◆ type_class

TypeClass storages::postgres::DBTypeDescription::type_class {TypeClass::kUnknown}

pg_type.typtype

Definition at line 110 of file pg_types.hpp.


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