ConnectInfo
public struct ConnectInfo
Encapsulates a set of connection parameters
-
the parameters included in this structure
Declaration
Swift
public private(set) var params: [ConnectParam] -
initalizes with an array of parameters
Declaration
Swift
public init(parameters: [ConnectParam])Parameters
parametersarray of parameters
-
initialize with basic parameters
Declaration
Swift
public init(host: String = "localhost", port: String = "5432", user: String, password: String = "", dbname: String, sslMode: ConnectParam.SSLMode = .prefer)Parameters
hostthe hostname to connect to
portthe port to connect on as a string. Defaults to
5432
userthe user to connect as
passwordthe password for user. Defaults to an empty string
dbnamethe name of the database to oonnect to
sslModethe SSL mode to use. Defaults to .prefer
View on GitHub
ConnectInfo Structure Reference