PostgreSQLError

public struct PostgreSQLError : Error

Encapsulates an error from PostgreSQL.

  • the internal PostgreSQL error code

    Declaration

    Swift

    public let code: Code
  • The last error message from the connection

    Declaration

    Swift

    public let reason: String
  • enum of native PostgreSQL error codes

    See more

    Declaration

    Swift

    public enum Code : String
  • Undocumented

    Declaration

    Swift

    public init(code: Code, errorMessage: String)
  • Create an error. This method will lock the connection

    Declaration

    Swift

    public init(code: Code, connection: Connection)

    Parameters

    code

    the postgresl error code

    connection

    the connection to retrieve the error message