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