Enumerations

The following enumerations are available globally.

  • Undocumented

    See more

    Declaration

    Swift

    public enum PGError: Error
  • PGConn Status Enumeration Adapter

    Values

    ok Connection is ready

    bad Connection procedure has failed

    started Waiting for connection to be made.

    made Connection OK; waiting to send.

    awaitingRsponse Waiting for a response from the postmaster.

    authenticationOk Received authentication; waiting for backend startup.

    setenv Negotiating environment-driven parameter settings.

    sslStartup Negotiating SSL encryption.

    needed Internal state: connect() needed

    checkWritable Checking if connection is able to handle write transactions.

    consume Consuming any remaining response messages on connection.

    Outside of an asynchronous connection procedure only ok and bad are seen.

    See more

    Declaration

    Swift

    public enum PGConnStatus
  • In-transaction status

    values

    idle currently idle

    active a command is in progress

    Is reported only when a query has been sent to the server and not yet completed.

    idleTransaction idle, in a valid transaction block

    idleFailedTransaction idle, in a failed transaction block

    unkown is reported if the connection is bad

    See more

    Declaration

    Swift

    public enum PGTransactionStatus
  • Result Status

    values

    emptyQuery The string sent to the server was empty.

    commandOK Successful completion of a command returning no data.

    tuplesOK Successful completion of a command returning data (such as a SELECT or SHOW).

    copyOut Copy Out (from server) data transfer started.

    copyIn Copy In (to server) data transfer started.

    badResponse The server’s response was not understood.

    nonfatalError A nonfatal error (a notice or warning) occurred.

    fatalError A fatal error occurred.

    copyBoth Copy In/Out (to and from server) data transfer started. This feature is currently used only for streaming replication, so this status should not occur in ordinary applications.

    singleTuple The PGresult contains a single result tuple from the current command. This status occurs only when single-row mode has been selected for the query

    See more

    Declaration

    Swift

    public enum PGResultStatus