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

    parameters

    array 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

    host

    the hostname to connect to

    port

    the port to connect on as a string. Defaults to 5432

    user

    the user to connect as

    password

    the password for user. Defaults to an empty string

    dbname

    the name of the database to oonnect to

    sslMode

    the SSL mode to use. Defaults to .prefer