From bb75ebe835d36b8d2f2572345c1c0f1a0955850d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 16 Oct 2014 08:16:15 +0200 Subject: php-pecl-pq: 0.5.1 (beta, New package) --- Makefile | 4 + REFLECTION | 1509 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ php-pecl-pq.spec | 228 +++++++++ 3 files changed, 1741 insertions(+) create mode 100644 Makefile create mode 100644 REFLECTION create mode 100644 php-pecl-pq.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..13af741 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../../common/Makefile + diff --git a/REFLECTION b/REFLECTION new file mode 100644 index 0000000..60a9fee --- /dev/null +++ b/REFLECTION @@ -0,0 +1,1509 @@ +Extension [ extension #172 pq version 0.5.1 ] { + + - Dependencies { + Dependency [ raphf (Required) ] + Dependency [ spl (Required) ] + Dependency [ json (Optional) ] + } + + - Classes [16] { + Interface [ interface pq\Converter ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [3] { + Method [ abstract public method convertTypes ] { + + - Parameters [0] { + } + } + + Method [ abstract public method convertFromString ] { + + - Parameters [2] { + Parameter #0 [ $data ] + Parameter #1 [ $type ] + } + } + + Method [ abstract public method convertToString ] { + + - Parameters [2] { + Parameter #0 [ $data ] + Parameter #1 [ $type ] + } + } + } + } + + Class [ class pq\DateTime extends DateTime implements DateTimeInterface, JsonSerializable ] { + + - Constants [11] { + Constant [ string ATOM ] { Y-m-d\TH:i:sP } + Constant [ string COOKIE ] { l, d-M-Y H:i:s T } + Constant [ string ISO8601 ] { Y-m-d\TH:i:sO } + Constant [ string RFC822 ] { D, d M y H:i:s O } + Constant [ string RFC850 ] { l, d-M-y H:i:s T } + Constant [ string RFC1036 ] { D, d M y H:i:s O } + Constant [ string RFC1123 ] { D, d M Y H:i:s O } + Constant [ string RFC2822 ] { D, d M Y H:i:s O } + Constant [ string RFC3339 ] { Y-m-d\TH:i:sP } + Constant [ string RSS ] { D, d M Y H:i:s O } + Constant [ string W3C ] { Y-m-d\TH:i:sP } + } + + - Static properties [0] { + } + + - Static methods [3] { + Method [ static public method __set_state ] { + } + + Method [ static public method createFromFormat ] { + + - Parameters [3] { + Parameter #0 [ $format ] + Parameter #1 [ $time ] + Parameter #2 [ $object ] + } + } + + Method [ static public method getLastErrors ] { + + - Parameters [0] { + } + } + } + + - Properties [1] { + Property [ public $format ] + } + + - Methods [17] { + Method [ public method __toString ] { + + - Parameters [0] { + } + } + + Method [ public method jsonSerialize ] { + + - Parameters [0] { + } + } + + Method [ public method __construct ] { + + - Parameters [2] { + Parameter #0 [ $time ] + Parameter #1 [ $object ] + } + } + + Method [ public method __wakeup ] { + } + + Method [ public method format ] { + + - Parameters [1] { + Parameter #0 [ $format ] + } + } + + Method [ public method modify ] { + + - Parameters [1] { + Parameter #0 [ $modify ] + } + } + + Method [ public method add ] { + + - Parameters [1] { + Parameter #0 [ $interval ] + } + } + + Method [ public method sub ] { + + - Parameters [1] { + Parameter #0 [ $interval ] + } + } + + Method [ public method getTimezone ] { + + - Parameters [0] { + } + } + + Method [ public method setTimezone ] { + + - Parameters [1] { + Parameter #0 [ $timezone ] + } + } + + Method [ public method getOffset ] { + + - Parameters [0] { + } + } + + Method [ public method setTime ] { + + - Parameters [3] { + Parameter #0 [ $hour ] + Parameter #1 [ $minute ] + Parameter #2 [ $second ] + } + } + + Method [ public method setDate ] { + + - Parameters [3] { + Parameter #0 [ $year ] + Parameter #1 [ $month ] + Parameter #2 [ $day ] + } + } + + Method [ public method setISODate ] { + + - Parameters [3] { + Parameter #0 [ $year ] + Parameter #1 [ $week ] + Parameter #2 [ $day ] + } + } + + Method [ public method setTimestamp ] { + + - Parameters [1] { + Parameter #0 [ $unixtimestamp ] + } + } + + Method [ public method getTimestamp ] { + + - Parameters [0] { + } + } + + Method [ public method diff ] { + + - Parameters [2] { + Parameter #0 [ $object ] + Parameter #1 [ $absolute ] + } + } + } + } + + Interface [ interface pq\Exception ] { + + - Constants [9] { + Constant [ integer INVALID_ARGUMENT ] { 0 } + Constant [ integer RUNTIME ] { 1 } + Constant [ integer CONNECTION_FAILED ] { 2 } + Constant [ integer IO ] { 3 } + Constant [ integer ESCAPE ] { 4 } + Constant [ integer BAD_METHODCALL ] { 5 } + Constant [ integer UNINITIALIZED ] { 6 } + Constant [ integer DOMAIN ] { 7 } + Constant [ integer SQL ] { 8 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [0] { + } + } + + Class [ class pq\Exception\InvalidArgumentException extends InvalidArgumentException implements pq\Exception ] { + + - Constants [9] { + Constant [ integer INVALID_ARGUMENT ] { 0 } + Constant [ integer RUNTIME ] { 1 } + Constant [ integer CONNECTION_FAILED ] { 2 } + Constant [ integer IO ] { 3 } + Constant [ integer ESCAPE ] { 4 } + Constant [ integer BAD_METHODCALL ] { 5 } + Constant [ integer UNINITIALIZED ] { 6 } + Constant [ integer DOMAIN ] { 7 } + Constant [ integer SQL ] { 8 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class pq\Exception\RuntimeException extends RuntimeException implements pq\Exception ] { + + - Constants [9] { + Constant [ integer INVALID_ARGUMENT ] { 0 } + Constant [ integer RUNTIME ] { 1 } + Constant [ integer CONNECTION_FAILED ] { 2 } + Constant [ integer IO ] { 3 } + Constant [ integer ESCAPE ] { 4 } + Constant [ integer BAD_METHODCALL ] { 5 } + Constant [ integer UNINITIALIZED ] { 6 } + Constant [ integer DOMAIN ] { 7 } + Constant [ integer SQL ] { 8 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class pq\Exception\BadMethodCallException extends BadMethodCallException implements pq\Exception ] { + + - Constants [9] { + Constant [ integer INVALID_ARGUMENT ] { 0 } + Constant [ integer RUNTIME ] { 1 } + Constant [ integer CONNECTION_FAILED ] { 2 } + Constant [ integer IO ] { 3 } + Constant [ integer ESCAPE ] { 4 } + Constant [ integer BAD_METHODCALL ] { 5 } + Constant [ integer UNINITIALIZED ] { 6 } + Constant [ integer DOMAIN ] { 7 } + Constant [ integer SQL ] { 8 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class pq\Exception\DomainException extends DomainException implements pq\Exception ] { + + - Constants [9] { + Constant [ integer INVALID_ARGUMENT ] { 0 } + Constant [ integer RUNTIME ] { 1 } + Constant [ integer CONNECTION_FAILED ] { 2 } + Constant [ integer IO ] { 3 } + Constant [ integer ESCAPE ] { 4 } + Constant [ integer BAD_METHODCALL ] { 5 } + Constant [ integer UNINITIALIZED ] { 6 } + Constant [ integer DOMAIN ] { 7 } + Constant [ integer SQL ] { 8 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [5] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + Property [ public $sqlstate ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class pq\Connection ] { + + - Constants [22] { + Constant [ integer OK ] { 0 } + Constant [ integer BAD ] { 1 } + Constant [ integer STARTED ] { 2 } + Constant [ integer MADE ] { 3 } + Constant [ integer AWAITING_RESPONSE ] { 4 } + Constant [ integer AUTH_OK ] { 5 } + Constant [ integer SSL_STARTUP ] { 7 } + Constant [ integer SETENV ] { 6 } + Constant [ integer TRANS_IDLE ] { 0 } + Constant [ integer TRANS_ACTIVE ] { 1 } + Constant [ integer TRANS_INTRANS ] { 2 } + Constant [ integer TRANS_INERROR ] { 3 } + Constant [ integer TRANS_UNKNOWN ] { 4 } + Constant [ integer POLLING_FAILED ] { 0 } + Constant [ integer POLLING_READING ] { 1 } + Constant [ integer POLLING_WRITING ] { 2 } + Constant [ integer POLLING_OK ] { 3 } + Constant [ string EVENT_NOTICE ] { notice } + Constant [ string EVENT_RESULT ] { result } + Constant [ string EVENT_RESET ] { reset } + Constant [ integer ASYNC ] { 1 } + Constant [ integer PERSISTENT ] { 2 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [19] { + Property [ public $status ] + Property [ public $transactionStatus ] + Property [ public $socket ] + Property [ public $errorMessage ] + Property [ public $busy ] + Property [ public $encoding ] + Property [ public $unbuffered ] + Property [ public $db ] + Property [ public $user ] + Property [ public $pass ] + Property [ public $host ] + Property [ public $port ] + Property [ public $options ] + Property [ public $eventHandlers ] + Property [ public $defaultFetchType ] + Property [ public $defaultTransactionIsolation ] + Property [ public $defaultTransactionReadonly ] + Property [ public $defaultTransactionDeferrable ] + Property [ public $defaultAutoConvert ] + } + + - Methods [30] { + Method [ public method __construct ] { + + - Parameters [2] { + Parameter #0 [ $dsn ] + Parameter #1 [ $async ] + } + } + + Method [ public method reset ] { + + - Parameters [0] { + } + } + + Method [ public method resetAsync ] { + + - Parameters [0] { + } + } + + Method [ public method poll ] { + + - Parameters [0] { + } + } + + Method [ public method exec ] { + + - Parameters [1] { + Parameter #0 [ $query ] + } + } + + Method [ public method execAsync ] { + + - Parameters [2] { + Parameter #0 [ $query ] + Parameter #1 [ $callable ] + } + } + + Method [ public method execParams ] { + + - Parameters [3] { + Parameter #0 [ $query ] + Parameter #1 [ array $params ] + Parameter #2 [ array or NULL $types ] + } + } + + Method [ public method execParamsAsync ] { + + - Parameters [4] { + Parameter #0 [ $query ] + Parameter #1 [ array $params ] + Parameter #2 [ array or NULL $types ] + Parameter #3 [ $callable ] + } + } + + Method [ public method prepare ] { + + - Parameters [3] { + Parameter #0 [ $name ] + Parameter #1 [ $query ] + Parameter #2 [ array or NULL $types ] + } + } + + Method [ public method prepareAsync ] { + + - Parameters [3] { + Parameter #0 [ $name ] + Parameter #1 [ $query ] + Parameter #2 [ array or NULL $types ] + } + } + + Method [ public method declare ] { + + - Parameters [3] { + Parameter #0 [ $name ] + Parameter #1 [ $flags ] + Parameter #2 [ $query ] + } + } + + Method [ public method declareAsync ] { + + - Parameters [3] { + Parameter #0 [ $name ] + Parameter #1 [ $flags ] + Parameter #2 [ $query ] + } + } + + Method [ public method unlisten ] { + + - Parameters [1] { + Parameter #0 [ $channel ] + } + } + + Method [ public method unlistenAsync ] { + + - Parameters [1] { + Parameter #0 [ $channel ] + } + } + + Method [ public method listen ] { + + - Parameters [2] { + Parameter #0 [ $channel ] + Parameter #1 [ $callable ] + } + } + + Method [ public method listenAsync ] { + + - Parameters [2] { + Parameter #0 [ $channel ] + Parameter #1 [ $callable ] + } + } + + Method [ public method notify ] { + + - Parameters [2] { + Parameter #0 [ $channel ] + Parameter #1 [ $message ] + } + } + + Method [ public method notifyAsync ] { + + - Parameters [2] { + Parameter #0 [ $channel ] + Parameter #1 [ $message ] + } + } + + Method [ public method getResult ] { + + - Parameters [0] { + } + } + + Method [ public method quote ] { + + - Parameters [1] { + Parameter #0 [ $string ] + } + } + + Method [ public method quoteName ] { + + - Parameters [1] { + Parameter #0 [ $type ] + } + } + + Method [ public method escapeBytea ] { + + - Parameters [1] { + Parameter #0 [ $bytea ] + } + } + + Method [ public method unescapeBytea ] { + + - Parameters [1] { + Parameter #0 [ $bytea ] + } + } + + Method [ public method startTransaction ] { + + - Parameters [3] { + Parameter #0 [ $isolation ] + Parameter #1 [ $readonly ] + Parameter #2 [ $deferrable ] + } + } + + Method [ public method startTransactionAsync ] { + + - Parameters [3] { + Parameter #0 [ $isolation ] + Parameter #1 [ $readonly ] + Parameter #2 [ $deferrable ] + } + } + + Method [ public method trace ] { + + - Parameters [1] { + Parameter #0 [ $stdio_stream ] + } + } + + Method [ public method off ] { + + - Parameters [1] { + Parameter #0 [ $type ] + } + } + + Method [ public method on ] { + + - Parameters [2] { + Parameter #0 [ $type ] + Parameter #1 [ $callable ] + } + } + + Method [ public method setConverter ] { + + - Parameters [1] { + Parameter #0 [ pq\Converter $converter ] + } + } + + Method [ public method unsetConverter ] { + + - Parameters [1] { + Parameter #0 [ pq\Converter $converter ] + } + } + } + } + + Class [ class pq\Cancel ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [1] { + Property [ public $connection ] + } + + - Methods [2] { + Method [ public method __construct ] { + + - Parameters [1] { + Parameter #0 [ pq\Connection $connection ] + } + } + + Method [ public method cancel ] { + + - Parameters [0] { + } + } + } + } + + Class [ class pq\Types ] { + + - Constants [152] { + Constant [ integer BOOL ] { 16 } + Constant [ integer BYTEA ] { 17 } + Constant [ integer CHAR ] { 18 } + Constant [ integer NAME ] { 19 } + Constant [ integer INT8 ] { 20 } + Constant [ integer INT2 ] { 21 } + Constant [ integer INT2VECTOR ] { 22 } + Constant [ integer INT4 ] { 23 } + Constant [ integer REGPROC ] { 24 } + Constant [ integer TEXT ] { 25 } + Constant [ integer OID ] { 26 } + Constant [ integer TID ] { 27 } + Constant [ integer XID ] { 28 } + Constant [ integer CID ] { 29 } + Constant [ integer OIDVECTOR ] { 30 } + Constant [ integer PG_TYPE ] { 71 } + Constant [ integer PG_ATTRIBUTE ] { 75 } + Constant [ integer PG_PROC ] { 81 } + Constant [ integer PG_CLASS ] { 83 } + Constant [ integer JSON ] { 114 } + Constant [ integer XML ] { 142 } + Constant [ integer XMLARRAY ] { 143 } + Constant [ integer JSONARRAY ] { 199 } + Constant [ integer PG_NODE_TREE ] { 194 } + Constant [ integer SMGR ] { 210 } + Constant [ integer POINT ] { 600 } + Constant [ integer LSEG ] { 601 } + Constant [ integer PATH ] { 602 } + Constant [ integer BOX ] { 603 } + Constant [ integer POLYGON ] { 604 } + Constant [ integer LINE ] { 628 } + Constant [ integer LINEARRAY ] { 629 } + Constant [ integer FLOAT4 ] { 700 } + Constant [ integer FLOAT8 ] { 701 } + Constant [ integer ABSTIME ] { 702 } + Constant [ integer RELTIME ] { 703 } + Constant [ integer TINTERVAL ] { 704 } + Constant [ integer UNKNOWN ] { 705 } + Constant [ integer CIRCLE ] { 718 } + Constant [ integer CIRCLEARRAY ] { 719 } + Constant [ integer MONEY ] { 790 } + Constant [ integer MONEYARRAY ] { 791 } + Constant [ integer MACADDR ] { 829 } + Constant [ integer INET ] { 869 } + Constant [ integer CIDR ] { 650 } + Constant [ integer BOOLARRAY ] { 1000 } + Constant [ integer BYTEAARRAY ] { 1001 } + Constant [ integer CHARARRAY ] { 1002 } + Constant [ integer NAMEARRAY ] { 1003 } + Constant [ integer INT2ARRAY ] { 1005 } + Constant [ integer INT2VECTORARRAY ] { 1006 } + Constant [ integer INT4ARRAY ] { 1007 } + Constant [ integer REGPROCARRAY ] { 1008 } + Constant [ integer TEXTARRAY ] { 1009 } + Constant [ integer OIDARRAY ] { 1028 } + Constant [ integer TIDARRAY ] { 1010 } + Constant [ integer XIDARRAY ] { 1011 } + Constant [ integer CIDARRAY ] { 1012 } + Constant [ integer OIDVECTORARRAY ] { 1013 } + Constant [ integer BPCHARARRAY ] { 1014 } + Constant [ integer VARCHARARRAY ] { 1015 } + Constant [ integer INT8ARRAY ] { 1016 } + Constant [ integer POINTARRAY ] { 1017 } + Constant [ integer LSEGARRAY ] { 1018 } + Constant [ integer PATHARRAY ] { 1019 } + Constant [ integer BOXARRAY ] { 1020 } + Constant [ integer FLOAT4ARRAY ] { 1021 } + Constant [ integer FLOAT8ARRAY ] { 1022 } + Constant [ integer ABSTIMEARRAY ] { 1023 } + Constant [ integer RELTIMEARRAY ] { 1024 } + Constant [ integer TINTERVALARRAY ] { 1025 } + Constant [ integer POLYGONARRAY ] { 1027 } + Constant [ integer ACLITEM ] { 1033 } + Constant [ integer ACLITEMARRAY ] { 1034 } + Constant [ integer MACADDRARRAY ] { 1040 } + Constant [ integer INETARRAY ] { 1041 } + Constant [ integer CIDRARRAY ] { 651 } + Constant [ integer CSTRINGARRAY ] { 1263 } + Constant [ integer BPCHAR ] { 1042 } + Constant [ integer VARCHAR ] { 1043 } + Constant [ integer DATE ] { 1082 } + Constant [ integer TIME ] { 1083 } + Constant [ integer TIMESTAMP ] { 1114 } + Constant [ integer TIMESTAMPARRAY ] { 1115 } + Constant [ integer DATEARRAY ] { 1182 } + Constant [ integer TIMEARRAY ] { 1183 } + Constant [ integer TIMESTAMPTZ ] { 1184 } + Constant [ integer TIMESTAMPTZARRAY ] { 1185 } + Constant [ integer INTERVAL ] { 1186 } + Constant [ integer INTERVALARRAY ] { 1187 } + Constant [ integer NUMERICARRAY ] { 1231 } + Constant [ integer TIMETZ ] { 1266 } + Constant [ integer TIMETZARRAY ] { 1270 } + Constant [ integer BIT ] { 1560 } + Constant [ integer BITARRAY ] { 1561 } + Constant [ integer VARBIT ] { 1562 } + Constant [ integer VARBITARRAY ] { 1563 } + Constant [ integer NUMERIC ] { 1700 } + Constant [ integer REFCURSOR ] { 1790 } + Constant [ integer REFCURSORARRAY ] { 2201 } + Constant [ integer REGPROCEDURE ] { 2202 } + Constant [ integer REGOPER ] { 2203 } + Constant [ integer REGOPERATOR ] { 2204 } + Constant [ integer REGCLASS ] { 2205 } + Constant [ integer REGTYPE ] { 2206 } + Constant [ integer REGPROCEDUREARRAY ] { 2207 } + Constant [ integer REGOPERARRAY ] { 2208 } + Constant [ integer REGOPERATORARRAY ] { 2209 } + Constant [ integer REGCLASSARRAY ] { 2210 } + Constant [ integer REGTYPEARRAY ] { 2211 } + Constant [ integer UUID ] { 2950 } + Constant [ integer UUIDARRAY ] { 2951 } + Constant [ integer TSVECTOR ] { 3614 } + Constant [ integer GTSVECTOR ] { 3642 } + Constant [ integer TSQUERY ] { 3615 } + Constant [ integer REGCONFIG ] { 3734 } + Constant [ integer REGDICTIONARY ] { 3769 } + Constant [ integer TSVECTORARRAY ] { 3643 } + Constant [ integer GTSVECTORARRAY ] { 3644 } + Constant [ integer TSQUERYARRAY ] { 3645 } + Constant [ integer REGCONFIGARRAY ] { 3735 } + Constant [ integer REGDICTIONARYARRAY ] { 3770 } + Constant [ integer TXID_SNAPSHOT ] { 2970 } + Constant [ integer TXID_SNAPSHOTARRAY ] { 2949 } + Constant [ integer INT4RANGE ] { 3904 } + Constant [ integer INT4RANGEARRAY ] { 3905 } + Constant [ integer NUMRANGE ] { 3906 } + Constant [ integer NUMRANGEARRAY ] { 3907 } + Constant [ integer TSRANGE ] { 3908 } + Constant [ integer TSRANGEARRAY ] { 3909 } + Constant [ integer TSTZRANGE ] { 3910 } + Constant [ integer TSTZRANGEARRAY ] { 3911 } + Constant [ integer DATERANGE ] { 3912 } + Constant [ integer DATERANGEARRAY ] { 3913 } + Constant [ integer INT8RANGE ] { 3926 } + Constant [ integer INT8RANGEARRAY ] { 3927 } + Constant [ integer RECORD ] { 2249 } + Constant [ integer RECORDARRAY ] { 2287 } + Constant [ integer CSTRING ] { 2275 } + Constant [ integer ANY ] { 2276 } + Constant [ integer ANYARRAY ] { 2277 } + Constant [ integer VOID ] { 2278 } + Constant [ integer TRIGGER ] { 2279 } + Constant [ integer EVENT_TRIGGER ] { 3838 } + Constant [ integer LANGUAGE_HANDLER ] { 2280 } + Constant [ integer INTERNAL ] { 2281 } + Constant [ integer OPAQUE ] { 2282 } + Constant [ integer ANYELEMENT ] { 2283 } + Constant [ integer ANYNONARRAY ] { 2776 } + Constant [ integer ANYENUM ] { 3500 } + Constant [ integer FDW_HANDLER ] { 3115 } + Constant [ integer ANYRANGE ] { 3831 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [1] { + Property [ public $connection ] + } + + - Methods [2] { + Method [ public method __construct ] { + + - Parameters [2] { + Parameter #0 [ pq\Connection $connection ] + Parameter #1 [ array or NULL $namespaces ] + } + } + + Method [ public method refresh ] { + + - Parameters [1] { + Parameter #0 [ array or NULL $namespaces ] + } + } + } + } + + Class [ class pq\Result implements Traversable, Countable ] { + + - Constants [21] { + Constant [ integer EMPTY_QUERY ] { 0 } + Constant [ integer COMMAND_OK ] { 1 } + Constant [ integer TUPLES_OK ] { 2 } + Constant [ integer COPY_OUT ] { 3 } + Constant [ integer COPY_IN ] { 4 } + Constant [ integer BAD_RESPONSE ] { 5 } + Constant [ integer NONFATAL_ERROR ] { 6 } + Constant [ integer FATAL_ERROR ] { 7 } + Constant [ integer COPY_BOTH ] { 8 } + Constant [ integer SINGLE_TUPLE ] { 9 } + Constant [ integer FETCH_ARRAY ] { 0 } + Constant [ integer FETCH_ASSOC ] { 1 } + Constant [ integer FETCH_OBJECT ] { 2 } + Constant [ integer CONV_BOOL ] { 1 } + Constant [ integer CONV_INT ] { 2 } + Constant [ integer CONV_FLOAT ] { 4 } + Constant [ integer CONV_SCALAR ] { 15 } + Constant [ integer CONV_ARRAY ] { 16 } + Constant [ integer CONV_DATETIME ] { 32 } + Constant [ integer CONV_JSON ] { 256 } + Constant [ integer CONV_ALL ] { 65535 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [8] { + Property [ public $status ] + Property [ public $statusMessage ] + Property [ public $errorMessage ] + Property [ public $numRows ] + Property [ public $numCols ] + Property [ public $affectedRows ] + Property [ public $fetchType ] + Property [ public $autoConvert ] + } + + - Methods [9] { + Method [ public method bind ] { + + - Parameters [2] { + Parameter #0 [ $col ] + Parameter #1 [ &$ref ] + } + } + + Method [ public method fetchBound ] { + + - Parameters [0] { + } + } + + Method [ public method fetchRow ] { + + - Parameters [1] { + Parameter #0 [ $fetch_type ] + } + } + + Method [ public method fetchCol ] { + + - Parameters [2] { + Parameter #0 [ &$ref ] + Parameter #1 [ $col ] + } + } + + Method [ public method fetchAll ] { + + - Parameters [1] { + Parameter #0 [ $fetch_type ] + } + } + + Method [ public method fetchAllCols ] { + + - Parameters [1] { + Parameter #0 [ $col ] + } + } + + Method [ public method count ] { + + - Parameters [0] { + } + } + + Method [ public method map ] { + + - Parameters [3] { + Parameter #0 [ $keys ] + Parameter #1 [ $vals ] + Parameter #2 [ $fetch_type ] + } + } + + Method [ public method desc ] { + + - Parameters [0] { + } + } + } + } + + Class [ class pq\Statement ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [2] { + Property [ public $name ] + Property [ public $connection ] + } + + - Methods [6] { + Method [ public method __construct ] { + + - Parameters [5] { + Parameter #0 [ pq\Connection $connection ] + Parameter #1 [ $name ] + Parameter #2 [ $query ] + Parameter #3 [ array or NULL $types ] + Parameter #4 [ $async ] + } + } + + Method [ public method bind ] { + + - Parameters [2] { + Parameter #0 [ $param_no ] + Parameter #1 [ &$param_ref ] + } + } + + Method [ public method exec ] { + + - Parameters [1] { + Parameter #0 [ array or NULL $params ] + } + } + + Method [ public method desc ] { + + - Parameters [0] { + } + } + + Method [ public method execAsync ] { + + - Parameters [2] { + Parameter #0 [ array or NULL $params ] + Parameter #1 [ $callable ] + } + } + + Method [ public method descAsync ] { + + - Parameters [1] { + Parameter #0 [ $callable ] + } + } + } + } + + Class [ class pq\Transaction ] { + + - Constants [3] { + Constant [ integer READ_COMMITTED ] { 0 } + Constant [ integer REPEATABLE_READ ] { 1 } + Constant [ integer SERIALIZABLE ] { 2 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ public $connection ] + Property [ public $isolation ] + Property [ public $readonly ] + Property [ public $deferrable ] + } + + - Methods [16] { + Method [ public method __construct ] { + + - Parameters [5] { + Parameter #0 [ pq\Connection $connection ] + Parameter #1 [ $async ] + Parameter #2 [ $isolation ] + Parameter #3 [ $readonly ] + Parameter #4 [ $deferrable ] + } + } + + Method [ public method commit ] { + + - Parameters [0] { + } + } + + Method [ public method rollback ] { + + - Parameters [0] { + } + } + + Method [ public method commitAsync ] { + + - Parameters [0] { + } + } + + Method [ public method rollbackAsync ] { + + - Parameters [0] { + } + } + + Method [ public method savepoint ] { + + - Parameters [0] { + } + } + + Method [ public method savepointAsync ] { + + - Parameters [0] { + } + } + + Method [ public method exportSnapshot ] { + + - Parameters [0] { + } + } + + Method [ public method exportSnapshotAsync ] { + + - Parameters [0] { + } + } + + Method [ public method importSnapshot ] { + + - Parameters [1] { + Parameter #0 [ $snapshot_id ] + } + } + + Method [ public method importSnapshotAsync ] { + + - Parameters [1] { + Parameter #0 [ $snapshot_id ] + } + } + + Method [ public method openLOB ] { + + - Parameters [2] { + Parameter #0 [ $oid ] + Parameter #1 [ $mode ] + } + } + + Method [ public method createLOB ] { + + - Parameters [1] { + Parameter #0 [ $mode ] + } + } + + Method [ public method unlinkLOB ] { + + - Parameters [1] { + Parameter #0 [ $oid ] + } + } + + Method [ public method importLOB ] { + + - Parameters [2] { + Parameter #0 [ $local_path ] + Parameter #1 [ $oid ] + } + } + + Method [ public method exportLOB ] { + + - Parameters [2] { + Parameter #0 [ $oid ] + Parameter #1 [ $local_path ] + } + } + } + } + + Class [ class pq\Cursor ] { + + - Constants [5] { + Constant [ integer BINARY ] { 1 } + Constant [ integer INSENSITIVE ] { 2 } + Constant [ integer WITH_HOLD ] { 4 } + Constant [ integer SCROLL ] { 16 } + Constant [ integer NO_SCROLL ] { 32 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [2] { + Property [ public $name ] + Property [ public $connection ] + } + + - Methods [7] { + Method [ public method __construct ] { + + - Parameters [5] { + Parameter #0 [ pq\Connection $connection ] + Parameter #1 [ $name ] + Parameter #2 [ $flags ] + Parameter #3 [ $query ] + Parameter #4 [ $async ] + } + } + + Method [ public method open ] { + + - Parameters [0] { + } + } + + Method [ public method close ] { + + - Parameters [0] { + } + } + + Method [ public method fetch ] { + + - Parameters [1] { + Parameter #0 [ $spec ] + } + } + + Method [ public method move ] { + + - Parameters [1] { + Parameter #0 [ $spec ] + } + } + + Method [ public method fetchAsync ] { + + - Parameters [2] { + Parameter #0 [ $spec ] + Parameter #1 [ $callback ] + } + } + + Method [ public method moveAsync ] { + + - Parameters [2] { + Parameter #0 [ $spec ] + Parameter #1 [ $callback ] + } + } + } + } + + Class [ class pq\COPY ] { + + - Constants [2] { + Constant [ integer FROM_STDIN ] { 0 } + Constant [ integer TO_STDOUT ] { 1 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ public $connection ] + Property [ public $expression ] + Property [ public $direction ] + Property [ public $options ] + } + + - Methods [4] { + Method [ public method __construct ] { + + - Parameters [4] { + Parameter #0 [ pq\Connection $connection ] + Parameter #1 [ $expression ] + Parameter #2 [ $direction ] + Parameter #3 [ $options ] + } + } + + Method [ public method put ] { + + - Parameters [1] { + Parameter #0 [ $data ] + } + } + + Method [ public method end ] { + + - Parameters [1] { + Parameter #0 [ $error ] + } + } + + Method [ public method get ] { + + - Parameters [1] { + Parameter #0 [ &$data ] + } + } + } + } + + Class [ class pq\LOB ] { + + - Constants [4] { + Constant [ integer INVALID_OID ] { 0 } + Constant [ integer R ] { 262144 } + Constant [ integer W ] { 131072 } + Constant [ integer RW ] { 393216 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [3] { + Property [ public $transaction ] + Property [ public $oid ] + Property [ public $stream ] + } + + - Methods [6] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ pq\Transaction $transaction ] + Parameter #1 [ $oid ] + Parameter #2 [ $mode ] + } + } + + Method [ public method write ] { + + - Parameters [1] { + Parameter #0 [ $data ] + } + } + + Method [ public method read ] { + + - Parameters [2] { + Parameter #0 [ $length ] + Parameter #1 [ &$read ] + } + } + + Method [ public method seek ] { + + - Parameters [2] { + Parameter #0 [ $offset ] + Parameter #1 [ $whence ] + } + } + + Method [ public method tell ] { + + - Parameters [0] { + } + } + + Method [ public method truncate ] { + + - Parameters [1] { + Parameter #0 [ $length ] + } + } + } + } + } +} + diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec new file mode 100644 index 0000000..a73a4f8 --- /dev/null +++ b/php-pecl-pq.spec @@ -0,0 +1,228 @@ +# spec file for php-pecl-pq +# +# Copyright (c) 2014 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/3.0/ +# +# Please, preserve the changelog entries +# +%{?scl: %scl_package php-pecl-pq} +%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} +%{!?__pecl: %global __pecl %{_bindir}/pecl} +%{!?__php: %global __php %{_bindir}/php} + +%global with_zts 0%{?__ztsphp:1} +%global pecl_name pq +# Test suite disabled, as require a postgresql server +%global with_tests %{?_with_tests:1}%{!?_with_tests:0} +%if "%{php_version}" < "5.6" +# After raph, json +%global ini_name z-%{pecl_name}.ini +%else +# After 40-json, 40-raphf +%global ini_name 50-%{pecl_name}.ini +%endif + +Summary: PostgreSQL client library (libpq) binding +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 0.5.1 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +License: BSD +Group: Development/Languages +URL: http://pecl.php.net/package/%{pecl_name} +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: postgresql-devel +BuildRequires: %{?scl_prefix}php-devel > 5.2 +BuildRequires: %{?scl_prefix}php-pear +BuildRequires: %{?scl_prefix}php-json +BuildRequires: %{?scl_prefix}php-pecl-raphf-devel + +Requires(post): %{__pecl} +Requires(postun): %{__pecl} +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}php(api) = %{php_core_api} +Requires: %{?scl_prefix}php-json%{?_isa} +Requires: %{?scl_prefix}php-raphf%{?_isa} +%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} + +Provides: %{?scl_prefix}php-%{pecl_name} = %{version} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} + +%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} +# Other third party repo stuff +Obsoletes: php53-pecl-%{pecl_name} <= %{version} +Obsoletes: php53u-pecl-%{pecl_name} <= %{version} +Obsoletes: php54-pecl-%{pecl_name} <= %{version} +Obsoletes: php54w-pecl-%{pecl_name} <= %{version} +%if "%{php_version}" > "5.5" +Obsoletes: php55u-pecl-%{pecl_name} <= %{version} +Obsoletes: php55w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "5.6" +Obsoletes: php56u-pecl-%{pecl_name} <= %{version} +Obsoletes: php56w-pecl-%{pecl_name} <= %{version} +%endif +%endif + +%if 0%{?fedora} < 20 && 0%{?rhel} < 7 +# Filter shared private +%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} +%{?filter_setup} +%endif + + +%description +PostgreSQL client library (libpq) binding. + +Documents: http://devel-m6w6.rhcloud.com/mdref/pq + +Highlights: +* Nearly complete support for asynchronous usage +* Extended type support by pg_type +* Fetching simple multi-dimensional array maps +* Working Gateway implementation + +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}. + + +%prep +%setup -q -c +mv %{pecl_name}-%{version} NTS + +# Don't install tests +sed -e '/role="test"/d' -i package.xml + +cd NTS +# Sanity check, really often broken +extver=$(sed -n '/#define PHP_PQ_VERSION/{s/.* "//;s/".*$//;p}' php_pq.h) +if test "x${extver}" != "x%{version}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}. + exit 1 +fi +cd .. + +%if %{with_zts} +# Duplicate source tree for NTS / ZTS build +cp -pr NTS ZTS +%endif + +# Create configuration file +cat << 'EOF' | tee %{ini_name} +; Enable "%{summary}" extension module +extension=%{pecl_name}.so +EOF + + +%build +cd NTS +%{_bindir}/phpize +%configure \ + --with-php-config=%{_bindir}/php-config +make %{?_smp_mflags} + +%if %{with_zts} +cd ../ZTS +%{_bindir}/zts-phpize +%configure \ + --with-php-config=%{_bindir}/zts-php-config +make %{?_smp_mflags} +%endif + + +%install +rm -rf %{buildroot} + +make -C NTS install INSTALL_ROOT=%{buildroot} + +# install config file +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} + +# Install XML package description +install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml + +%if %{with_zts} +make -C ZTS install INSTALL_ROOT=%{buildroot} + +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} +%endif + +# Documentation +for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') +do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +done + + +%post +%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : + + +%postun +if [ $1 -eq 0 ] ; then + %{pecl_uninstall} %{pecl_name} >/dev/null || : +fi + + +%check +cd NTS +OPT="-n" +[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so" +[ -f %{php_extdir}/raphf.so ] && OPT="$OPT -d extension=raphf.so" + +: Minimal load test for NTS extension +%{__php} $OPT \ + --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ + --modules | grep %{pecl_name} + +%if %{with_tests} +: Upstream test suite for NTS extension +TEST_PHP_EXECUTABLE=%{__php} \ +TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{__php} -n run-tests.php --show-diff +%endif + +%if %{with_zts} +cd ../ZTS +: Minimal load test for ZTS extension +%{__ztsphp} $OPT \ + --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ + --modules | grep %{pecl_name} + +%if %{with_tests} +: Upstream test suite for ZTS extension +TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ +TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{_bindir}/zts-php -n run-tests.php --show-diff +%endif +%endif + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%doc %{pecl_docdir}/%{pecl_name} +%{?_licensedir:%license NTS/LICENSE} + +%{pecl_xmldir}/%{name}.xml +%config(noreplace) %{php_inidir}/%{ini_name} +%{php_extdir}/%{pecl_name}.so + +%if %{with_zts} +%config(noreplace) %{php_ztsinidir}/%{ini_name} +%{php_ztsextdir}/%{pecl_name}.so +%endif + + +%changelog +* Thu Oct 16 2014 Remi Collet - 0.5.1-1 +- initial package, version 0.5.1 (beta) \ No newline at end of file -- cgit