PostgresNIO Documentation

Structure Postgres​Data​Type

public struct PostgresDataType: RawRepresentable, Hashable, CustomStringConvertible  

The data type's raw object ID. Use select * from pg_type where oid = <idhere>; to lookup more information.

%187 PostgresDataType PostgresDataType CustomStringConvertible CustomStringConvertible PostgresDataType->CustomStringConvertible Hashable Hashable PostgresDataType->Hashable ExpressibleByIntegerLiteral ExpressibleByIntegerLiteral PostgresDataType->ExpressibleByIntegerLiteral RawRepresentable RawRepresentable PostgresDataType->RawRepresentable

Conforms To

CustomStringConvertible
ExpressibleByIntegerLiteral
Hashable
RawRepresentable

Initializers

init(_:​)

public init(_ rawValue: UInt32)  

init?(raw​Value:​)

public init?(rawValue: UInt32)  

init(integer​Literal:​)

public init(integerLiteral value: UInt32)  

Properties

null

public static let null  

0

bool

public static let bool  

16

bytea

public static let bytea  

17

char

public static let char  

18

name

public static let name  

19

int8

public static let int8  

20

int2

public static let int2  

21

int4

public static let int4  

23

regproc

public static let regproc  

24

text

public static let text  

25

oid

public static let oid  

26

json

public static let json  

114

pg​Node​Tree

public static let pgNodeTree  

194 pg_node_tree

point

public static let point  

600

float4

public static let float4  

700

float8

public static let float8  

701

money

public static let money  

790

bool​Array

public static let boolArray  

1000 _bool

bytea​Array

public static let byteaArray  

1001 _bytea

char​Array

public static let charArray  

1002 _char

name​Array

public static let nameArray  

1003 _name

int2Array

public static let int2Array  

1005 _int2

int4Array

public static let int4Array  

1007 _int4

text​Array

public static let textArray  

1009 _text

varchar​Array

public static let varcharArray  

1015 _varchar

int8Array

public static let int8Array  

1016 _int8

point​Array

public static let pointArray  

1017 _point

float4Array

public static let float4Array  

1021 _float4

float8Array

public static let float8Array  

1022 _float8

aclitem​Array

public static let aclitemArray  

1034 _aclitem

bpchar

public static let bpchar  

1042

varchar

public static let varchar  

1043

date

public static let date  

1082

time

public static let time  

1083

timestamp

public static let timestamp  

1114

timestamp​Array

public static let timestampArray  

1115 _timestamp

timestamptz

public static let timestamptz  

1184

timetz

public static let timetz  

1266

numeric

public static let numeric  

1700

void

public static let void  

2278

uuid

public static let uuid  

2950

uuid​Array

public static let uuidArray  

2951 _uuid

jsonb

public static let jsonb  

3802

jsonb​Array

public static let jsonbArray  

3807 _jsonb

raw​Value

public var rawValue: UInt32

The raw data type code recognized by PostgreSQL.

is​User​Defined

public var isUserDefined: Bool  

Returns true if the type's raw value is greater than 2^14. This appears to be true for all user-defined types, but I don't have any documentation to back this up.

known​SQLName

public var knownSQLName: String?  

Returns the known SQL name, if one exists. Note: This only supports a limited subset of all PSQL types and is meant for convenience only.

description

public var description: String  

See CustomStringConvertible.