pq\Transaction docs
[mdref/mdref-pq] / pq / Connection.md
index 924e10414499c804710188b5381f7f70ebe94d8f..4dd56abe18b395391c92902f8f0479672f055249 100644 (file)
@@ -1,6 +1,6 @@
 # class pq\Connection
 
-A class representing a connection to the PostgreSQL server.
+The connection to the PostgreSQL server.
 
 See the [General Usage](pq/Connection/: General Usage) page for an introduction on how to use this class.
 
@@ -19,7 +19,7 @@ Broken connection; consider pq\Connection::reset() or recreation.
 * STARTED  
 Waiting for connection to be made.
 * MADE  
-Connection OK; waiting to send.
+Connection okay; waiting to send.
 * AWAITING_RESPONSE  
 Waiting for a response from the server.
 * AUTH_OK  
@@ -61,31 +61,46 @@ Negotiating environment-driven parameter settings.
 
 
 ## Properties:
-* public (readonly) $status  
+* public (readonly) int $status  
   A [connection status constant](pq/Connection#Connection.Status:) value.
-* public (readonly) $transactionStatus  
+* public (readonly) int $transactionStatus  
   A [transaction status constant](pq/Connection#Transaction.Status:) value.
-* public (readonly) $socket  
+* public (readonly) resource $socket  
   The server socket resource.
-* public (readonly) $busy  
+* public (readonly) bool $busy  
   Whether the connection is busy with [asynchronous operations](pq/Connection/: Asynchronous Usage).
-* public (readonly) $errorMessage  
+* public (readonly) string $errorMessage  
   Any error message on failure.
-* public $encoding = NULL  
+* public (readonly) array $eventHandlers  
+  List of registered event handlers.
+* public string $encoding = NULL  
   Connection character set.
-* public $unbuffered = FALSE  
-  Whether to fetch results in unbuffered mode, i.e. each row generates a distinct pq\Result.
+* public bool $unbuffered = FALSE  
+  Whether to fetch [asynchronous](pq/Connection/: Asynchronous Usage) results in unbuffered mode, i.e. each row generates a distinct pq\Result.
 
 ### Connection Information:
-* public (readonly) $db  
-The database name of the connection.
-* public (readonly) $user  
-The user name of the connection.
-* public (readonly) $pass  
-The password of the connection.
-* public (readonly) $host  
-The server host name of the connection.
-* public (readonly) $port  
-The port of the connection.
-* public (readonly) $options  
-The command-line options passed in the connection request.
+* public (readonly) string $db  
+  The database name of the connection.
+* public (readonly) string $user  
+  The user name of the connection.
+* public (readonly) string $pass  
+  The password of the connection.
+* public (readonly) string $host  
+  The server host name of the connection.
+* public (readonly) string $port  
+  The port of the connection.
+* public (readonly) string $options  
+  The command-line options passed in the connection request.
+
+### Inheritable Defaults:
+* public int $defaultFetchType = pq\Result::FETCH_ARRAY  
+  Default fetch type for future pq\Result instances.
+* public int $defaultAutoConvert = pq\Result::CONV_ALL  
+  Default conversion bitmask for future pq\Result instances.
+* public int $defaultTransactionIsolation = pq\Transaction::READ_COMMITTED  
+  Default transaction isolation level for future pq\Transaction instances.
+* public bool $defaultTransactionReadonly = FALSE  
+  Default transaction readonlyness for futire pq\Transaction instances.
+* public bool $defaultTransactionDeferrable = FALSE  
+  Default transaction deferrability for future pq\Transaction instances.
+