From 93da2a61c2a39975665a22428849e48377cf4ccd Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Sat, 18 Jan 2020 16:09:44 +0100 Subject: [PATCH] update live stub --- pq.stub.php | 290 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 290 insertions(+) diff --git a/pq.stub.php b/pq.stub.php index 8d54672..0a82dc4 100644 --- a/pq.stub.php +++ b/pq.stub.php @@ -23,6 +23,38 @@ class COPY { * Start a COPY operation from the server to STDOUT. */ const TO_STDOUT = 1; + /** + * The connection to the PostgreSQL server. + * + * @public + * @readonly + * @var \pq\Connection + */ + public $connection; + /** + * The expression of the COPY statement used to start the operation. + * + * @public + * @readonly + * @var string + */ + public $expression; + /** + * The drection of the COPY operation (pq\COPY::FROM_STDIN or pq\COPY::TO_STDOUT). + * + * @public + * @readonly + * @var int + */ + public $direction; + /** + * Any additional options used to start the COPY operation. + * + * @public + * @readonly + * @var string + */ + public $options; /** * Start a COPY operation. * @@ -68,6 +100,14 @@ class COPY { * Request cancellation of an asynchronous query. */ class Cancel { + /** + * The connection to cancel the query on. + * + * @public + * @readonly + * @var \pq\Connection + */ + public $connection; /** * Create a new cancellation request for an [asynchronous](pq/Connection/: Asynchronous Usage) query. * @@ -180,6 +220,54 @@ class Connection { * Register the event handler for connection resets. */ const EVENT_RESET = 'reset'; + /** + * A [connection status constant](pq/Connection#Connection.Status:) value. + * + * @public + * @readonly + * @var int + */ + public $status; + /** + * A [transaction status constant](pq/Connection#Transaction.Status:) value. + * + * @public + * @readonly + * @var int + */ + public $transactionStatus; + /** + * The server socket resource. + * + * @public + * @readonly + * @var + */ + public $socket; + /** + * Whether the connection is busy with [asynchronous operations](pq/Connection/: Asynchronous Usage). + * + * @public + * @readonly + * @var bool + */ + public $busy; + /** + * Any error message on failure. + * + * @public + * @readonly + * @var string + */ + public $errorMessage; + /** + * List of registered event handlers. + * + * @public + * @readonly + * @var array + */ + public $eventHandlers; /** * Connection character set. * @@ -203,6 +291,56 @@ class Connection { * @var bool */ public $nonblocking = FALSE; + /** + * The database name of the connection. + * + * @public + * @readonly + * @var string + */ + public $db; + /** + * The user name of the connection. + * + * @public + * @readonly + * @var string + */ + public $user; + /** + * The password of the connection. + * + * @public + * @readonly + * @var string + */ + public $pass; + /** + * The server host name of the connection. + * + * @public + * @readonly + * @var string + */ + public $host; + /** + * The port of the connection. + * + * @public + * @readonly + * @var string + */ + public $port; + /** + * The command-line options passed in the connection request. + * + * ### Inheritable Defaults: + * + * @public + * @readonly + * @var string + */ + public $options; /** * Default fetch type for future pq\Result instances. * @@ -664,6 +802,22 @@ class Cursor { * See the [notes in the official PostgreSQL documentation](http://www.postgresql.org/docs/current/static/sql-declare.html#SQL-DECLARE-NOTES) for more information. */ const NO_SCROLL = 32; + /** + * The connection the cursor was declared on. + * + * @public + * @readonly + * @var \pq\Connection + */ + public $connection; + /** + * The identifying name of the cursor. + * + * @public + * @readonly + * @var string + */ + public $name; /** * Declare a cursor. * See pq\Connection::declare(). @@ -853,6 +1007,30 @@ class LOB { * Read/write mode. */ const RW = 393216; + /** + * The transaction wrapping the operations on the *large object*. + * + * @public + * @readonly + * @var \pq\Transaction + */ + public $transaction; + /** + * The OID of the *large object*. + * + * @public + * @readonly + * @var int + */ + public $oid; + /** + * The stream connected to the *large object*. + * + * @public + * @readonly + * @var + */ + public $stream; /** * Open or create a *large object*. * See pq\Transaction::openLOB() and pq\Transaction::createLOB(). @@ -1003,6 +1181,62 @@ class Result implements \Traversable, \Countable { * Do all of the above. */ const CONV_ALL = 65535; + /** + * A [status constant](pq/Result#Status.values:). + * + * @public + * @readonly + * @var int + */ + public $status; + /** + * The accompanying status message. + * + * @public + * @readonly + * @var string + */ + public $statusMessage; + /** + * Any error message if $status indicates an error. + * + * @public + * @readonly + * @var string + */ + public $errorMessage; + /** + * The number of rows in the result set. + * + * @public + * @readonly + * @var int + */ + public $numRows; + /** + * The number of fields in a single tuple of the result set. + * + * @public + * @readonly + * @var int + */ + public $numCols; + /** + * The number of rows affected by a statement. + * + * @public + * @readonly + * @var int + */ + public $affectedRows; + /** + * Error details. See [PQresultErrorField](https://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQRESULTERRORFIELD) docs. + * + * @public + * @readonly + * @var array + */ + public $diag; /** * The [type of return value](pq/Result#Fetch.types:) the fetch methods should return when no fetch type argument was given. Defaults to pq\Connection::$defaultFetchType. * @@ -1120,6 +1354,38 @@ class Result implements \Traversable, \Countable { * See pq\Connection::prepare(). */ class Statement { + /** + * The connection to the server. + * + * @public + * @readonly + * @var \pq\Connection + */ + public $connection; + /** + * The identifiying name of the prepared statement. + * + * @public + * @readonly + * @var string + */ + public $name; + /** + * The query string used to prepare the statement. + * + * @public + * @readonly + * @var string + */ + public $query; + /** + * List of corresponding query parameter type OIDs for the prepared statement. + * + * @public + * @readonly + * @var array + */ + public $types; /** * Prepare a new statement. * See pq\Connection::prepare(). @@ -1242,6 +1508,14 @@ class Transaction { * Transaction isolation level that guarantees serializable repeatability which might lead to serialization_failure on high concurrency. */ const SERIALIZABLE = 2; + /** + * The connection the transaction was started on. + * + * @public + * @readonly + * @var \pq\Connection + */ + public $connection; /** * The transaction isolation level. * @@ -2052,6 +2326,14 @@ class Types implements \ArrayAccess { * OID of the `anyrange` type. */ const ANYRANGE = 3831; + /** + * The connection which was used to obtain type information. + * + * @public + * @readonly + * @var \pq\Connection + */ + public $connection; /** * Create a new instance populated with information obtained from the `pg_type` relation. * @@ -2082,6 +2364,14 @@ class BadMethodCallException extends \BadMethodCallException implements \pq\Exce * Implementation or SQL syntax error. */ class DomainException extends \DomainException implements \pq\Exception { + /** + * The SQLSTATE code, see the [official documentation](http://www.postgresql.org/docs/current/static/errcodes-appendix.html) for further information. + * + * @public + * @readonly + * @var string + */ + public $sqlstate; } /** * An invalid argument was passed to a method. -- 2.30.2