add deps
[pharext/pharext.org] / deps / pq.api.php
1 <?php
2
3 namespace pq
4 {
5
6 interface Converter
7 {
8 abstract public function convertTypes();
9
10 abstract public function convertFromString($data, $type);
11
12 abstract public function convertToString($data, $type);
13
14 }
15
16 class Cancel
17 {
18 public $connection;
19
20 public function __construct(\pq\Connection $connection) {
21 }
22
23 public function cancel() {
24 }
25
26 }
27
28 interface Exception
29 {
30 const INVALID_ARGUMENT = 0;
31 const RUNTIME = 1;
32 const CONNECTION_FAILED = 2;
33 const IO = 3;
34 const ESCAPE = 4;
35 const BAD_METHODCALL = 5;
36 const UNINITIALIZED = 6;
37 const DOMAIN = 7;
38 const SQL = 8;
39
40 }
41
42 class COPY
43 {
44 const FROM_STDIN = 0;
45 const TO_STDOUT = 1;
46
47 public $connection;
48 public $expression;
49 public $direction;
50 public $options;
51
52 public function __construct(\pq\Connection $connection, $expression, $direction, $options = NULL) {
53 }
54
55 public function put($data) {
56 }
57
58 public function end($error = NULL) {
59 }
60
61 public function get(&$data) {
62 }
63
64 }
65
66 class Connection
67 {
68 const OK = 0;
69 const BAD = 1;
70 const STARTED = 2;
71 const MADE = 3;
72 const AWAITING_RESPONSE = 4;
73 const AUTH_OK = 5;
74 const SSL_STARTUP = 7;
75 const SETENV = 6;
76 const TRANS_IDLE = 0;
77 const TRANS_ACTIVE = 1;
78 const TRANS_INTRANS = 2;
79 const TRANS_INERROR = 3;
80 const TRANS_UNKNOWN = 4;
81 const POLLING_FAILED = 0;
82 const POLLING_READING = 1;
83 const POLLING_WRITING = 2;
84 const POLLING_OK = 3;
85 const EVENT_NOTICE = 'notice';
86 const EVENT_RESULT = 'result';
87 const EVENT_RESET = 'reset';
88 const ASYNC = 1;
89 const PERSISTENT = 2;
90
91 public $status;
92 public $transactionStatus;
93 public $socket;
94 public $errorMessage;
95 public $busy;
96 public $encoding;
97 public $unbuffered;
98 public $db;
99 public $user;
100 public $pass;
101 public $host;
102 public $port;
103 public $options;
104 public $eventHandlers;
105 public $defaultFetchType;
106 public $defaultTransactionIsolation;
107 public $defaultTransactionReadonly;
108 public $defaultTransactionDeferrable;
109 public $defaultAutoConvert;
110
111 public function __construct($dsn, $async = NULL) {
112 }
113
114 public function reset() {
115 }
116
117 public function resetAsync() {
118 }
119
120 public function poll() {
121 }
122
123 public function exec($query) {
124 }
125
126 public function execAsync($query, $callable = NULL) {
127 }
128
129 public function execParams($query, array $params, array $types = NULL) {
130 }
131
132 public function execParamsAsync($query, array $params, array $types = NULL, $callable = NULL) {
133 }
134
135 public function prepare($name, $query, array $types = NULL) {
136 }
137
138 public function prepareAsync($name, $query, array $types = NULL) {
139 }
140
141 public function declare($name, $flags, $query) {
142 }
143
144 public function declareAsync($name, $flags, $query = NULL) {
145 }
146
147 public function unlisten($channel) {
148 }
149
150 public function unlistenAsync($channel) {
151 }
152
153 public function listen($channel, $callable) {
154 }
155
156 public function listenAsync($channel = NULL, $callable = NULL) {
157 }
158
159 public function notify($channel, $message) {
160 }
161
162 public function notifyAsync($channel, $message) {
163 }
164
165 public function getResult() {
166 }
167
168 public function quote($string) {
169 }
170
171 public function quoteName($type) {
172 }
173
174 public function escapeBytea($bytea) {
175 }
176
177 public function unescapeBytea($bytea) {
178 }
179
180 public function startTransaction($isolation = NULL, $readonly = NULL, $deferrable = NULL) {
181 }
182
183 public function startTransactionAsync($isolation = NULL, $readonly = NULL, $deferrable = NULL) {
184 }
185
186 public function trace($stdio_stream = NULL) {
187 }
188
189 public function off($type) {
190 }
191
192 public function on($type, $callable) {
193 }
194
195 public function setConverter(\pq\Converter $converter) {
196 }
197
198 public function unsetConverter(\pq\Converter $converter) {
199 }
200
201 }
202
203 class Cursor
204 {
205 const BINARY = 1;
206 const INSENSITIVE = 2;
207 const WITH_HOLD = 4;
208 const SCROLL = 16;
209 const NO_SCROLL = 32;
210
211 public $name;
212 public $connection;
213
214 public function __construct(\pq\Connection $connection, $name, $flags, $query, $async = NULL) {
215 }
216
217 public function open() {
218 }
219
220 public function close() {
221 }
222
223 public function fetch($spec) {
224 }
225
226 public function move($spec = NULL) {
227 }
228
229 public function fetchAsync($spec = NULL, $callback = NULL) {
230 }
231
232 public function moveAsync($spec = NULL, $callback = NULL) {
233 }
234
235 }
236
237 class DateTime extends \DateTime implements \DateTimeInterface, \JsonSerializable
238 {
239 public $format;
240
241 public static function createFromFormat($format, $datetime, $timezone = NULL) {
242 }
243
244 public function __toString() {
245 }
246
247 public function jsonSerialize() {
248 }
249
250 }
251
252 class LOB
253 {
254 const INVALID_OID = 0;
255 const R = 262144;
256 const W = 131072;
257 const RW = 393216;
258
259 public $transaction;
260 public $oid;
261 public $stream;
262
263 public function __construct(\pq\Transaction $transaction, $oid = NULL, $mode = NULL) {
264 }
265
266 public function write($data) {
267 }
268
269 public function read($length = NULL, &$read = NULL) {
270 }
271
272 public function seek($offset, $whence = NULL) {
273 }
274
275 public function tell() {
276 }
277
278 public function truncate($length = NULL) {
279 }
280
281 }
282
283 class Result implements \Countable
284 {
285 const EMPTY_QUERY = 0;
286 const COMMAND_OK = 1;
287 const TUPLES_OK = 2;
288 const COPY_OUT = 3;
289 const COPY_IN = 4;
290 const BAD_RESPONSE = 5;
291 const NONFATAL_ERROR = 6;
292 const FATAL_ERROR = 7;
293 const COPY_BOTH = 8;
294 const SINGLE_TUPLE = 9;
295 const FETCH_ARRAY = 0;
296 const FETCH_ASSOC = 1;
297 const FETCH_OBJECT = 2;
298 const CONV_BOOL = 1;
299 const CONV_INT = 2;
300 const CONV_FLOAT = 4;
301 const CONV_SCALAR = 15;
302 const CONV_ARRAY = 16;
303 const CONV_DATETIME = 32;
304 const CONV_JSON = 256;
305 const CONV_ALL = 65535;
306
307 public $status;
308 public $statusMessage;
309 public $errorMessage;
310 public $numRows;
311 public $numCols;
312 public $affectedRows;
313 public $fetchType;
314 public $autoConvert;
315
316 public function bind($col, &$ref) {
317 }
318
319 public function fetchBound() {
320 }
321
322 public function fetchRow($fetch_type = NULL) {
323 }
324
325 public function fetchCol(&$ref, $col = NULL) {
326 }
327
328 public function fetchAll($fetch_type = NULL) {
329 }
330
331 public function fetchAllCols($col = NULL) {
332 }
333
334 public function count() {
335 }
336
337 public function map($keys = NULL, $vals = NULL, $fetch_type = NULL) {
338 }
339
340 public function desc() {
341 }
342
343 }
344
345 class Statement
346 {
347 public $name;
348 public $connection;
349 public $query;
350 public $types;
351
352 public function __construct(\pq\Connection $connection, $name, $query, array $types = NULL, $async = NULL) {
353 }
354
355 public function bind($param_no, &$param_ref) {
356 }
357
358 public function deallocate() {
359 }
360
361 public function deallocateAsync() {
362 }
363
364 public function desc() {
365 }
366
367 public function descAsync($callable) {
368 }
369
370 public function exec(array $params = NULL) {
371 }
372
373 public function execAsync(array $params = NULL, $callable = NULL) {
374 }
375
376 public function prepare() {
377 }
378
379 public function prepareAsync() {
380 }
381
382 }
383
384 class Transaction
385 {
386 const READ_COMMITTED = 0;
387 const REPEATABLE_READ = 1;
388 const SERIALIZABLE = 2;
389
390 public $connection;
391 public $isolation;
392 public $readonly;
393 public $deferrable;
394
395 public function __construct(\pq\Connection $connection, $async = NULL, $isolation = NULL, $readonly = NULL, $deferrable = NULL) {
396 }
397
398 public function commit() {
399 }
400
401 public function rollback() {
402 }
403
404 public function commitAsync() {
405 }
406
407 public function rollbackAsync() {
408 }
409
410 public function savepoint() {
411 }
412
413 public function savepointAsync() {
414 }
415
416 public function exportSnapshot() {
417 }
418
419 public function exportSnapshotAsync() {
420 }
421
422 public function importSnapshot($snapshot_id) {
423 }
424
425 public function importSnapshotAsync($snapshot_id) {
426 }
427
428 public function openLOB($oid, $mode = NULL) {
429 }
430
431 public function createLOB($mode = NULL) {
432 }
433
434 public function unlinkLOB($oid) {
435 }
436
437 public function importLOB($local_path, $oid = NULL) {
438 }
439
440 public function exportLOB($oid, $local_path) {
441 }
442
443 }
444
445 class Types
446 {
447 const BOOL = 16;
448 const BYTEA = 17;
449 const CHAR = 18;
450 const NAME = 19;
451 const INT8 = 20;
452 const INT2 = 21;
453 const INT2VECTOR = 22;
454 const INT4 = 23;
455 const REGPROC = 24;
456 const TEXT = 25;
457 const OID = 26;
458 const TID = 27;
459 const XID = 28;
460 const CID = 29;
461 const OIDVECTOR = 30;
462 const PG_TYPE = 71;
463 const PG_ATTRIBUTE = 75;
464 const PG_PROC = 81;
465 const PG_CLASS = 83;
466 const JSON = 114;
467 const XML = 142;
468 const XMLARRAY = 143;
469 const JSONARRAY = 199;
470 const PG_NODE_TREE = 194;
471 const SMGR = 210;
472 const POINT = 600;
473 const LSEG = 601;
474 const PATH = 602;
475 const BOX = 603;
476 const POLYGON = 604;
477 const LINE = 628;
478 const LINEARRAY = 629;
479 const FLOAT4 = 700;
480 const FLOAT8 = 701;
481 const ABSTIME = 702;
482 const RELTIME = 703;
483 const TINTERVAL = 704;
484 const UNKNOWN = 705;
485 const CIRCLE = 718;
486 const CIRCLEARRAY = 719;
487 const MONEY = 790;
488 const MONEYARRAY = 791;
489 const MACADDR = 829;
490 const INET = 869;
491 const CIDR = 650;
492 const BOOLARRAY = 1000;
493 const BYTEAARRAY = 1001;
494 const CHARARRAY = 1002;
495 const NAMEARRAY = 1003;
496 const INT2ARRAY = 1005;
497 const INT2VECTORARRAY = 1006;
498 const INT4ARRAY = 1007;
499 const REGPROCARRAY = 1008;
500 const TEXTARRAY = 1009;
501 const OIDARRAY = 1028;
502 const TIDARRAY = 1010;
503 const XIDARRAY = 1011;
504 const CIDARRAY = 1012;
505 const OIDVECTORARRAY = 1013;
506 const BPCHARARRAY = 1014;
507 const VARCHARARRAY = 1015;
508 const INT8ARRAY = 1016;
509 const POINTARRAY = 1017;
510 const LSEGARRAY = 1018;
511 const PATHARRAY = 1019;
512 const BOXARRAY = 1020;
513 const FLOAT4ARRAY = 1021;
514 const FLOAT8ARRAY = 1022;
515 const ABSTIMEARRAY = 1023;
516 const RELTIMEARRAY = 1024;
517 const TINTERVALARRAY = 1025;
518 const POLYGONARRAY = 1027;
519 const ACLITEM = 1033;
520 const ACLITEMARRAY = 1034;
521 const MACADDRARRAY = 1040;
522 const INETARRAY = 1041;
523 const CIDRARRAY = 651;
524 const CSTRINGARRAY = 1263;
525 const BPCHAR = 1042;
526 const VARCHAR = 1043;
527 const DATE = 1082;
528 const TIME = 1083;
529 const TIMESTAMP = 1114;
530 const TIMESTAMPARRAY = 1115;
531 const DATEARRAY = 1182;
532 const TIMEARRAY = 1183;
533 const TIMESTAMPTZ = 1184;
534 const TIMESTAMPTZARRAY = 1185;
535 const INTERVAL = 1186;
536 const INTERVALARRAY = 1187;
537 const NUMERICARRAY = 1231;
538 const TIMETZ = 1266;
539 const TIMETZARRAY = 1270;
540 const BIT = 1560;
541 const BITARRAY = 1561;
542 const VARBIT = 1562;
543 const VARBITARRAY = 1563;
544 const NUMERIC = 1700;
545 const REFCURSOR = 1790;
546 const REFCURSORARRAY = 2201;
547 const REGPROCEDURE = 2202;
548 const REGOPER = 2203;
549 const REGOPERATOR = 2204;
550 const REGCLASS = 2205;
551 const REGTYPE = 2206;
552 const REGPROCEDUREARRAY = 2207;
553 const REGOPERARRAY = 2208;
554 const REGOPERATORARRAY = 2209;
555 const REGCLASSARRAY = 2210;
556 const REGTYPEARRAY = 2211;
557 const UUID = 2950;
558 const UUIDARRAY = 2951;
559 const PG_LSN = 3220;
560 const PG_LSNARRAY = 3221;
561 const TSVECTOR = 3614;
562 const GTSVECTOR = 3642;
563 const TSQUERY = 3615;
564 const REGCONFIG = 3734;
565 const REGDICTIONARY = 3769;
566 const TSVECTORARRAY = 3643;
567 const GTSVECTORARRAY = 3644;
568 const TSQUERYARRAY = 3645;
569 const REGCONFIGARRAY = 3735;
570 const REGDICTIONARYARRAY = 3770;
571 const JSONB = 3802;
572 const JSONBARRAY = 3807;
573 const TXID_SNAPSHOT = 2970;
574 const TXID_SNAPSHOTARRAY = 2949;
575 const INT4RANGE = 3904;
576 const INT4RANGEARRAY = 3905;
577 const NUMRANGE = 3906;
578 const NUMRANGEARRAY = 3907;
579 const TSRANGE = 3908;
580 const TSRANGEARRAY = 3909;
581 const TSTZRANGE = 3910;
582 const TSTZRANGEARRAY = 3911;
583 const DATERANGE = 3912;
584 const DATERANGEARRAY = 3913;
585 const INT8RANGE = 3926;
586 const INT8RANGEARRAY = 3927;
587 const RECORD = 2249;
588 const RECORDARRAY = 2287;
589 const CSTRING = 2275;
590 const ANY = 2276;
591 const ANYARRAY = 2277;
592 const VOID = 2278;
593 const TRIGGER = 2279;
594 const EVENT_TRIGGER = 3838;
595 const LANGUAGE_HANDLER = 2280;
596 const INTERNAL = 2281;
597 const OPAQUE = 2282;
598 const ANYELEMENT = 2283;
599 const ANYNONARRAY = 2776;
600 const ANYENUM = 3500;
601 const FDW_HANDLER = 3115;
602 const ANYRANGE = 3831;
603
604 public $connection;
605
606 public function __construct(\pq\Connection $connection, array $namespaces = NULL) {
607 }
608
609 public function refresh(array $namespaces = NULL) {
610 }
611
612 }
613 }
614
615 namespace pq\Exception
616 {
617
618 class BadMethodCallException extends \BadMethodCallException implements \pq\Exception
619 {
620 }
621
622 class InvalidArgumentException extends \InvalidArgumentException implements \pq\Exception
623 {
624 }
625
626 class RuntimeException extends \RuntimeException implements \pq\Exception
627 {
628 }
629
630 class DomainException extends \DomainException implements \pq\Exception
631 {
632 public $sqlstate;
633
634 }
635 }
636