#include <userver/storages/postgres/io/pg_types.hpp>
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} |
|
strong |
PosgtreSQL type category. See https://www.postgresql.org/docs/12/catalog-pg-type.html#CATALOG-TYPCATEGORY-TABLE.
Enumerator | |
---|---|
kInvalid | Invalid type category. |
kArray | |
kBoolean | |
kComposite | |
kDatetime | |
kEnumeration | |
kGeometric | |
kNetwork | |
kNumeric | |
kPseudotype | |
kRange | |
kString | |
kTimespan | |
kUser | User types, created by fourth form of create type statement https://www.postgresql.org/docs/12/sql-createtype.html |
kBitstring | |
kUnknown | Unknown type category. |
Definition at line 80 of file pg_types.hpp.
|
strong |
Definition at line 68 of file pg_types.hpp.
|
inline |
Definition at line 128 of file pg_types.hpp.
Oid storages::postgres::DBTypeDescription::array_type {kInvalidOid} |
pg_type.typarray
Definition at line 119 of file pg_types.hpp.
Oid storages::postgres::DBTypeDescription::base_type {kInvalidOid} |
pg_type.typbasetype Base type for domains
Definition at line 122 of file pg_types.hpp.
TypeCategory storages::postgres::DBTypeDescription::category {TypeCategory::kInvalid} |
pg_type.typcategory
Definition at line 112 of file pg_types.hpp.
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.
Integer storages::postgres::DBTypeDescription::length {0} |
pg_type.typlen
Definition at line 108 of file pg_types.hpp.
std::string storages::postgres::DBTypeDescription::name |
pg_type.typname
Definition at line 106 of file pg_types.hpp.
bool storages::postgres::DBTypeDescription::not_null {false} |
pg_type.typnotnull Used only with domains
Definition at line 125 of file pg_types.hpp.
Oid storages::postgres::DBTypeDescription::oid {kInvalidOid} |
pg_type.oid
Definition at line 102 of file pg_types.hpp.
Oid storages::postgres::DBTypeDescription::relation_id {kInvalidOid} |
pg_type.typrelid
Definition at line 114 of file pg_types.hpp.
std::string storages::postgres::DBTypeDescription::schema |
pg_namespace.nspname
Definition at line 104 of file pg_types.hpp.
TypeClass storages::postgres::DBTypeDescription::type_class {TypeClass::kUnknown} |
pg_type.typtype
Definition at line 110 of file pg_types.hpp.