Structure
PostgresConnection.Configuration
A configuration object for a connection.
struct Configuration
Topics
Structures
struct AuthenticationLegacy authentication parameters structure. Replaced byusernameetc.struct ConnectionLegacy connection parameters structure. Replaced byhostetc.struct OptionsDescribes options affecting how the underlying connection is made.struct TLSThe possible modes of operation for TLS encapsulation of a connection.
Initializers
init(connection: PostgresConnection.Configuration.Connection, authentication: PostgresConnection.Configuration.Authentication, tls: PostgresConnection.Configuration.TLS)Legacy initializer. Replaced byinit(host:port:username:password:database:tls:)etc.init(establishedChannel: any Channel, tls: PostgresConnection.Configuration.TLS, username: String, password: String?, database: String?)Create a configuration for establishing a connection to a Postgres server over a preestablishedNIOCore/Channel.init(establishedChannel: any Channel, username: String, password: String?, database: String?)Create a configuration for establishing a connection to a Postgres server over a preestablishedNIOCore/Channel.init(host: String, port: Int, username: String, password: String?, database: String?, tls: PostgresConnection.Configuration.TLS)Create a configuration for connecting to a server with a hostname and optional port.init(unixSocketPath: String, username: String, password: String?, database: String?)Create a configuration for connecting to a server through a UNIX domain socket.
Instance Properties
var authentication: PostgresConnection.Configuration.Authenticationvar connection: PostgresConnection.Configuration.ConnectionAccessor for legacy connection parameters. Replaced byhostetc.var database: String?The name of the database to open.var establishedChannel: (any Channel)?TheChannelto use in existing-channel configurations.var host: String?The hostname to connect to for TCP configurations.var options: PostgresConnection.Configuration.OptionsOptions for handling the communication channel. Most users don’t need to change these.var password: String?The password, if any, for the user specified byusername.var port: Int?The port to connect to for TCP configurations.var tls: PostgresConnection.Configuration.TLSThe TLS mode to use for the connection. Valid for all configurations.var unixSocketPath: String?The socket path to connect to for Unix domain socket connections.var username: StringThe username to connect with.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype