Initializer
init(host:port:username:password:database:tls:)
Create a configuration for connecting to a server with a hostname and optional port.
init(host: String, port: Int = 5432, username: String, password: String?, database: String?, tls: PostgresClient.Configuration.TLS)
Parameters
hostThe hostname to connect to.
portThe TCP port to connect to (defaults to 5432).
usernameThe username to authenticate with.
passwordThe password to authenticate with.
databaseThe database to open. If
nil, the client connects to the server’s default database.tlsThe TLS mode to use.
Discussion
This specifies a TCP connection. If you’re unsure which kind of connection you want, you almost definitely want this one.