Classes
- PostgresConnection
-
A Postgres connection. Use it to run queries against a Postgres server.
- PostgresListenContext
-
Context for receiving NotificationResponse messages on a connection, used for PostgreSQL's
LISTEN
/NOTIFY
support. - PostgresMessageDecoder
- PostgresMessageEncoder
- SASLAuthenticationManager
Structures
- PostgresConnection.Configuration
-
A configuration object for a connection
- PostgresConnection.Configuration.Authentication
-
A structure to configure the connection's authentication properties
- PostgresConnection.Configuration.TLS
- PostgresConnection.Configuration.Connection
- PreparedQuery
- PostgresNumeric
- PostgresData
- PostgresDataType
-
The data type's raw object ID. Use
select * from pg_type where oid = <idhere>;
to lookup more information. - PostgresRow
-
PostgresRow
represents a single table row that is received from the server for a query or a prepared statement. Its element type isPostgresCell
. - PostgresRow.Iterator
- PostgresRow.Index
- PostgresRandomAccessRow
-
A random access row of
PostgresCell
s. Its initialization is O(n) where n is the number of columns in the row. All subsequent cell access are O(1). - PostgresMessage.Bind
-
Identifies the message as a Bind command.
- PostgresMessage.Bind.Parameter
- PostgresMessage.Close
-
Identifies the message as a Close Command
- PostgresMessage.CommandComplete
-
Identifies the message as a Close command.
- PostgresMessage.Describe
-
Identifies the message as a Describe command.
- PostgresMessage.Execute
-
Identifies the message as an Execute command.
- PostgresMessage.ParameterDescription
-
Identifies the message as a parameter description.
- PostgresMessage.ParameterStatus
- PostgresMessage.Parse
-
Identifies the message as a Parse command.
- PostgresMessage.Password
-
Identifies the message as a password response. Note that this is also used for GSSAPI and SSPI response messages (which is really a design error, since the contained data is not a null-terminated string in that case, but can be arbitrary binary data).
- PostgresMessage.ReadyForQuery
-
Identifies the message type. ReadyForQuery is sent whenever the backend is ready for a new query cycle.
- PostgresMessage.SASLResponse
-
SASL ongoing challenge response message sent by the client.
- PostgresMessage.SASLInitialResponse
-
SASL initial challenge response message sent by the client.
- PostgresMessage.SSLRequest
-
A message asking the PostgreSQL server if SSL is supported For more info, see https://www.postgresql.org/docs/10/static/protocol-flow.html#id-1.10.5.7.11
- PostgresMessage.SimpleQuery
-
Identifies the message as a simple query.
- PostgresMessage.Startup
-
First message sent from the frontend during startup.
- PostgresMessage.Sync
-
Identifies the message as a Bind command.
- PostgresMessage.Terminate
- PostgresMessage
-
A frontend or backend Postgres message.
- PostgresMessage.BackendKeyData
-
Identifies the message as cancellation key data. The frontend must save these values if it wishes to be able to issue CancelRequest messages later.
- PostgresMessage.DataRow
-
Identifies the message as a data row.
- PostgresMessage.DataRow.Column
- PostgresMessage.Error
-
First message sent from the frontend during startup.
- PostgresMessage.Identifier
-
Identifies an incoming or outgoing postgres message. Sent as the first byte, before the message size. Values are not unique across all identifiers, meaning some messages will require keeping state to identify.
- PostgresMessage.NotificationResponse
-
Identifies the message as a notification response.
- PostgresMessage.RowDescription
-
Identifies the message as a row description.
- PostgresMessage.RowDescription.Field
-
Describes a single field returns in a
RowDescription
message. - PostgresDecodingError
-
An error that may happen when a
PostgresRow
orPostgresCell
is decoded to native Swift types. - PostgresDecodingError.Code
- PostgresCell
- PostgresEncodingContext
-
A context that is passed to Swift objects that are encoded into the Postgres wire format. Used to pass further information to the encoding method.
- PostgresDecodingContext
-
A context that is passed to Swift objects that are decoded from the Postgres wire format. Used to pass further information to the decoding method.
- PostgresQuery
-
A Postgres SQL query, that can be executed on a Postgres server. Contains the raw sql string and bindings.
- PostgresQuery.StringInterpolation
- PostgresBindings
- PostgresRowSequence
-
An async sequence of
PostgresRow
s. - PostgresRowSequence.AsyncIterator
- PostgresQueryResult
- PostgresQueryMetadata
- PostgresError.Code
Enumerations
- PostgresFormat
-
The format the postgres types are encoded in on the wire.
- PostgresMessage.Authentication
-
Authentication request returned by the server.
- PostgresMessage.Close.Target
-
Close Target. Determines if the Close command should close a prepared statement or portal.
- PostgresMessage.Describe.Command
-
Command type.
- PostgresMessage.Error.Field
- PostgresError
- SASLAuthenticationError
-
Various errors that can occur during SASL negotiation that are not specific to the particular SASL mechanism in use.
- SASLAuthenticationStepResult
-
Signifies an action to be taken as the result of a single step of a SASL mechanism.
Protocols
- PostgresJSONCodable
- PostgresJSONBCodable
- PostgresDataConvertible
- PostgresMessageType
- PostgresArrayEncodable
-
A type, of which arrays can be encoded into and decoded from a postgres binary format
- PostgresArrayDecodable
-
A type that can be decoded into a Swift Array of its own type from a Postgres array.
- PostgresEncodable
-
A type that can encode itself to a postgres wire binary representation.
- PostgresDecodable
-
A type that can decode itself from a postgres wire binary representation.
- PostgresDatabase
- PostgresRequest
-
Protocol to encapsulate a function call on the Postgres server
- PostgresJSONDecoder
-
A protocol that mimicks the Foundation
JSONDecoder.decode(_:from:)
function. Conform a non-Foundation JSON decoder to this protocol if you want PostgresNIO to be able to use it when decoding JSON & JSONB values (seePostgresNIO._defaultJSONDecoder
) - PostgresJSONEncoder
-
A protocol that mimicks the Foundation
JSONEncoder.encode(_:)
function. Conform a non-Foundation JSON encoder to this protocol if you want PostgresNIO to be able to use it when encoding JSON & JSONB values (seePostgresNIO._defaultJSONEncoder
) - SASLAuthenticationMechanism
-
The protocol to which all SASL mechanism implementations must conform. It is the responsibility of each individual implementation to provide an API for creating instances of itself which are able to retrieve information from the caller (such as usernames and passwords) by some mechanism.
Typealiases
- PostgresFormatCode
Variables
- _defaultJSONDecoder
-
The default JSON decoder used by PostgresNIO when decoding JSON & JSONB values. As
_defaultJSONDecoder
will be reused for decoding all JSON & JSONB values from potentially multiple threads at once, you must ensure your custom JSON decoder is thread safe internally likeFoundation.JSONDecoder
. - _defaultJSONEncoder
-
The default JSON encoder used by PostgresNIO when encoding JSON & JSONB values. As
_defaultJSONEncoder
will be reused for encoding all JSON & JSONB values from potentially multiple threads at once, you must ensure your custom JSON encoder is thread safe internally likeFoundation.JSONEncoder
.
Extensions
- Array
- Bool
- ByteBuffer
- Data
- Date
- Decimal
- Double
- Float
- Int
- Int16
- Int32
- Int64
- Int8
- Optional
- RawRepresentable
- Set
- String
- UInt
- UInt16
- UInt32
- UInt64
- UInt8
- UUID