PGConnection

public final class PGConnection

connection management class

  • Connection Status enum

    See more

    Declaration

    Swift

    public enum StatusType
  • empty init

    Declaration

    Swift

    public init()
  • Makes a new connection to the database server.

    Declaration

    Swift

    public func connectdb(info: String) -> StatusType
  • Close db connection

    Declaration

    Swift

    public func close()
  • Closes the connection to the server. Also frees memory used by the PGconn object.

    Declaration

    Swift

    public func finish()
  • Returns the status of the connection.

    Declaration

    Swift

    public func status() -> StatusType
  • Returns the error message most recently generated by an operation on the connection.

    Declaration

    Swift

    public func errorMessage() -> String
  • Submits a command to the server and waits for the result.

    Declaration

    Swift

    public func exec(statement: String) -> PGResult
  • Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL command text.

    Declaration

    Swift

    public func exec(statement: String, params: [String]) -> PGResult