Structure
PostgresClient.Configuration
struct Configuration
Topics
Structures
struct OptionsDescribes general client behavior options. Those settings are considered advanced options.struct TLS
Initializers
init(host: String, port: Int, username: String, password: String?, database: String?, tls: PostgresClient.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 database: String?The name of the database to open.var host: String?The hostname to connect to for TCP configurations.var options: PostgresClient.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: PostgresClient.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
See Also
Essentials
class PostgresClientA Postgres client that is backed by an underlying connection pool. UsePostgresClient.Configurationto change the client’s behavior.class PostgresConnectionA Postgres connection. Use it to run queries against a Postgres server.- Running QueriesInteract with the PostgreSQL database by running Queries.