userver: userver/storages/postgres/io/pg_types.hpp File Reference
Loading...
Searching...
No Matches
pg_types.hpp File Reference

Detailed Description

Postgres-specific types I/O support.

Definition in file pg_types.hpp.

Go to the source code of this file.

#include <cstdint>
#include <string>
#include <string_view>
#include <userver/storages/postgres/detail/db_data_type_name.hpp>
+ Include dependency graph for pg_types.hpp:
+ This graph shows which files directly or indirectly include this file:

Classes

struct  storages::postgres::DBTypeName
 Identity for a PostgreSQL type name. More...
 
struct  storages::postgres::DBTypeDescription
 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. More...
 
struct  storages::postgres::DBTypeDescription::NameHash
 
struct  storages::postgres::DBTypeDescription::NamesEqual
 
struct  storages::postgres::DBTypeDescription::TypeCategoryHash
 
struct  storages::postgres::CompositeFieldDef
 Description of a field in a user-defined composite type, for type checking. More...
 
struct  storages::postgres::io::ArrayType< TypeOid >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kBoolean >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kBytea >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kChar >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kName >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kInt2 >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kInt4 >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kInt8 >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kText >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kOid >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kCidr >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kInet >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kTid >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kXid >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kCid >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kLsn >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kFloat4 >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kFloat8 >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kBpchar >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kVarchar >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kDate >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kTime >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kTimestamp >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kTimestamptz >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kInterval >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kBit >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kVarbit >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kNumeric >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kUuid >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kInt4Range >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kNumRange >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kTimestampRange >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kTimestamptzRange >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kDateRange >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kInt8Range >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kPoint >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kLseg >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kLine >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kBox >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kPath >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kPolygon >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kCircle >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kJson >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kJsonb >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kRecord >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kMacaddr >
 
struct  storages::postgres::io::ArrayType< PredefinedOids::kMacaddr8 >
 
struct  std::hash<::storages::postgres::io::PredefinedOids >
 
struct  std::hash<::storages::postgres::DBTypeName >
 

Namespaces

namespace  storages
 Components, clients and helpers for different databases and storages.
 
namespace  storages::postgres
 Top namespace for uPg driver.
 
namespace  storages::postgres::io
 uPg input-output.
 
namespace  std
 STL namespace.
 

Typedefs

using storages::postgres::Oid = unsigned int
 PostgreSQL Oid type.
 
template<PredefinedOids TypeOid>
using storages::postgres::io::PredefinedOid = std::integral_constant<PredefinedOids, TypeOid>
 

Enumerations

enum class  storages::postgres::io::PredefinedOids {
  kInvalid = kInvalidOid ,
  kBoolean = 16 ,
  kBytea = 17 ,
  kChar = 18 ,
  kName = 19 ,
  kInt8 = 20 ,
  kInt2 = 21 ,
  kInt2Vector = 22 ,
  kInt4 = 23 ,
  kRegproc = 24 ,
  kText = 25 ,
  kOid = 26 ,
  kTid = 27 ,
  kXid = 28 ,
  kCid = 29 ,
  kOidVector = 30 ,
  kJson = 114 ,
  kJsonArray = 199 ,
  kXml = 142 ,
  kPgNodeTree = 194 ,
  kPgDdlCommand = 32 ,
  kPoint = 600 ,
  kLseg = 601 ,
  kPath = 602 ,
  kBox = 603 ,
  kPolygon = 604 ,
  kLine = 628 ,
  kLineArray = 629 ,
  kFloat4 = 700 ,
  kFloat8 = 701 ,
  kAbstime = 702 ,
  kReltime = 703 ,
  kTinterval = 704 ,
  kUnknown = 705 ,
  kCircle = 718 ,
  kCircleArray = 719 ,
  kCash = 790 ,
  kMacaddr = 829 ,
  kMacaddrArray = 1040 ,
  kMacaddr8 = 774 ,
  kMacaddr8Array = 775 ,
  kInet = 869 ,
  kInetArray = 1041 ,
  kCidr = 650 ,
  kCidrArray = 651 ,
  kBooleanArray = 1000 ,
  kByteaArray = 1001 ,
  kCharArray = 1002 ,
  kNameArray = 1003 ,
  kInt2Array = 1005 ,
  kInt4Array = 1007 ,
  kTextArray = 1009 ,
  kTidArray = 1010 ,
  kXidArray = 1011 ,
  kCidArray = 1012 ,
  kBphcarArray = 1014 ,
  kVarcharArray = 1015 ,
  kInt8Array = 1016 ,
  kPointArray = 1017 ,
  kLsegArray = 1018 ,
  kPathArray = 1019 ,
  kBoxArray = 1020 ,
  kFloat4Array = 1021 ,
  kFloat8Array = 1022 ,
  kPolygonArray = 1027 ,
  kOidArray = 1028 ,
  kAclItem = 1033 ,
  kCstringArray = 1263 ,
  kBpchar = 1042 ,
  kVarchar = 1043 ,
  kDate = 1082 ,
  kTime = 1083 ,
  kDateArray = 1182 ,
  kTimeArray = 1183 ,
  kTimestamp = 1114 ,
  kTimestampArray = 1115 ,
  kTimestamptz = 1184 ,
  kTimestamptzArray = 1185 ,
  kInterval = 1186 ,
  kIntervalArray = 1187 ,
  kNumericArray = 1231 ,
  kTimetz = 1266 ,
  kBit = 1560 ,
  kBitArray = 1561 ,
  kVarbit = 1562 ,
  kVarbitArray = 1563 ,
  kNumeric = 1700 ,
  kRefcursor = 1790 ,
  kRegprocedure = 2202 ,
  kRegoper = 2203 ,
  kRegoperator = 2204 ,
  kRegclass = 2205 ,
  kRegtype = 2206 ,
  kRegrole = 4096 ,
  kRegtypearray = 2211 ,
  kUuid = 2950 ,
  kUuidArray = 2951 ,
  kLsn = 3220 ,
  kLsnArray = 3221 ,
  kTsvector = 3614 ,
  kGtsvector = 3642 ,
  kTsquery = 3615 ,
  kRegconfig = 3734 ,
  kRegdictionary = 3769 ,
  kJsonb = 3802 ,
  kJsonbArray = 3807 ,
  kRecord = 2249 ,
  kRecordArray = 2287 ,
  kCstring = 2275 ,
  kAny = 2276 ,
  kAnyArray = 2277 ,
  kVoid = 2278 ,
  kTrigger = 2279 ,
  kEvttrigger = 3838 ,
  kLanguageHandler = 2280 ,
  kInternal = 2281 ,
  kOpaque = 2282 ,
  kAnyElement = 2283 ,
  kAnyNonArray = 2776 ,
  kAnyEnum = 3500 ,
  kFdwHandler = 3115 ,
  kAnyRange = 3831 ,
  kInt4Range = 3904 ,
  kInt4RangeArray = 3905 ,
  kNumRange = 3906 ,
  kNumRangeArray = 3907 ,
  kTimestampRange = 3908 ,
  kTimestampRangeArray = 3909 ,
  kTimestamptzRange = 3910 ,
  kTimestamptzRangeArray = 3911 ,
  kDateRange = 3912 ,
  kDateRangeArray = 3913 ,
  kInt8Range = 3926 ,
  kInt8RangeArray = 3927
}
 

Variables

constexpr Oid storages::postgres::kInvalidOid = 0
 

Type aliases for integral types

using storages::postgres::Smallint = std::int16_t
 
using storages::postgres::Integer = std::int32_t
 
using storages::postgres::Bigint = std::int64_t
 
using storages::postgres::Float4 = float
 
using storages::postgres::Float8 = double
 
std::string storages::postgres::ToString (DBTypeDescription::TypeClass)