Enumerations
The following enumerations are available globally.
-
Undocumented
See moreDeclaration
Swift
public enum PGError: Error
-
PGConn Status Enumeration Adapter
Values
ok
Connection is readybad
Connection procedure has failedstarted
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() neededcheckWritable
Checking if connection is able to handle write transactions.consume
Consuming any remaining response messages on connection.Outside of an asynchronous connection procedure only
See moreok
andbad
are seen.Declaration
Swift
public enum PGConnStatus
-
In-transaction status
values
idle
currently idleactive
a command is in progressIs reported only when a query has been sent to the server and not yet completed.
idleTransaction
idle, in a valid transaction blockidleFailedTransaction
idle, in a failed transaction block
See moreunkown
is reported if the connection is badDeclaration
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.
See moresingleTuple
The 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