Enumerations
The following enumerations are available globally.
-
Undocumented
See moreDeclaration
Swift
public enum PGError: Error -
PGConn Status Enumeration Adapter
Values
okConnection is readybadConnection procedure has failedstartedWaiting for connection to be made.madeConnection OK; waiting to send.awaitingRsponseWaiting for a response from the postmaster.authenticationOkReceived authentication; waiting for backend startup.setenvNegotiating environment-driven parameter settings.sslStartupNegotiating SSL encryption.neededInternal state: connect() neededcheckWritableChecking if connection is able to handle write transactions.consumeConsuming any remaining response messages on connection.Outside of an asynchronous connection procedure only
See moreokandbadare seen.Declaration
Swift
public enum PGConnStatus -
In-transaction status
values
idlecurrently idleactivea command is in progressIs reported only when a query has been sent to the server and not yet completed.
idleTransactionidle, in a valid transaction blockidleFailedTransactionidle, in a failed transaction block
See moreunkownis reported if the connection is badDeclaration
Swift
public enum PGTransactionStatus -
Result Status
values
emptyQueryThe string sent to the server was empty.commandOKSuccessful completion of a command returning no data.tuplesOKSuccessful completion of a command returning data (such as a SELECT or SHOW).copyOutCopy Out (from server) data transfer started.copyInCopy In (to server) data transfer started.badResponseThe server’s response was not understood.nonfatalErrorA nonfatal error (a notice or warning) occurred.fatalErrorA fatal error occurred.copyBothCopy 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.
See moresingleTupleThe PGresult contains a single result tuple from the current command. This status occurs only when single-row mode has been selected for the queryDeclaration
Swift
public enum PGResultStatus
Enumerations Reference