xref: /php-src/ext/pdo/pdo_dbh.stub.php (revision d6a0b3af)
1<?php
2
3/** @generate-class-entries */
4
5/** @not-serializable */
6class PDO
7{
8    /** @cvalue LONG_CONST(PDO_PARAM_NULL) */
9    public const int PARAM_NULL = 0;
10    /** @cvalue LONG_CONST(PDO_PARAM_BOOL) */
11    public const int PARAM_BOOL = 5;
12    /** @cvalue LONG_CONST(PDO_PARAM_INT) */
13    public const int PARAM_INT = 1;
14    /** @cvalue LONG_CONST(PDO_PARAM_STR) */
15    public const int PARAM_STR = 2;
16    /** @cvalue LONG_CONST(PDO_PARAM_LOB) */
17    public const int PARAM_LOB = 3;
18    /** @cvalue LONG_CONST(PDO_PARAM_STMT) */
19    public const int PARAM_STMT = 4;
20    /** @cvalue LONG_CONST(PDO_PARAM_INPUT_OUTPUT) */
21    public const int PARAM_INPUT_OUTPUT = UNKNOWN;
22    /** @cvalue LONG_CONST(PDO_PARAM_STR_NATL) */
23    public const int PARAM_STR_NATL = UNKNOWN;
24    /** @cvalue LONG_CONST(PDO_PARAM_STR_CHAR) */
25    public const int PARAM_STR_CHAR = UNKNOWN;
26
27    /** @cvalue LONG_CONST(PDO_PARAM_EVT_ALLOC) */
28    public const int PARAM_EVT_ALLOC = UNKNOWN;
29    /** @cvalue LONG_CONST(PDO_PARAM_EVT_FREE) */
30    public const int PARAM_EVT_FREE = UNKNOWN;
31    /** @cvalue LONG_CONST(PDO_PARAM_EVT_EXEC_PRE) */
32    public const int PARAM_EVT_EXEC_PRE = UNKNOWN;
33    /** @cvalue LONG_CONST(PDO_PARAM_EVT_EXEC_POST) */
34    public const int PARAM_EVT_EXEC_POST = UNKNOWN;
35    /** @cvalue LONG_CONST(PDO_PARAM_EVT_FETCH_PRE) */
36    public const int PARAM_EVT_FETCH_PRE = UNKNOWN;
37    /** @cvalue LONG_CONST(PDO_PARAM_EVT_FETCH_POST) */
38    public const int PARAM_EVT_FETCH_POST = UNKNOWN;
39    /** @cvalue LONG_CONST(PDO_PARAM_EVT_NORMALIZE) */
40    public const int PARAM_EVT_NORMALIZE = UNKNOWN;
41
42    /** @cvalue LONG_CONST(PDO_FETCH_USE_DEFAULT) */
43    public const int FETCH_DEFAULT = UNKNOWN;
44    /** @cvalue LONG_CONST(PDO_FETCH_LAZY) */
45    public const int FETCH_LAZY = UNKNOWN;
46    /** @cvalue LONG_CONST(PDO_FETCH_ASSOC) */
47    public const int FETCH_ASSOC = UNKNOWN;
48    /** @cvalue LONG_CONST(PDO_FETCH_NUM) */
49    public const int FETCH_NUM = UNKNOWN;
50    /** @cvalue LONG_CONST(PDO_FETCH_BOTH) */
51    public const int FETCH_BOTH = UNKNOWN;
52    /** @cvalue LONG_CONST(PDO_FETCH_OBJ) */
53    public const int FETCH_OBJ = UNKNOWN;
54    /** @cvalue LONG_CONST(PDO_FETCH_BOUND) */
55    public const int FETCH_BOUND = UNKNOWN;
56    /** @cvalue LONG_CONST(PDO_FETCH_COLUMN) */
57    public const int FETCH_COLUMN = UNKNOWN;
58    /** @cvalue LONG_CONST(PDO_FETCH_CLASS) */
59    public const int FETCH_CLASS = UNKNOWN;
60    /** @cvalue LONG_CONST(PDO_FETCH_INTO) */
61    public const int FETCH_INTO = UNKNOWN;
62    /** @cvalue LONG_CONST(PDO_FETCH_FUNC) */
63    public const int FETCH_FUNC = UNKNOWN;
64    /** @cvalue LONG_CONST(PDO_FETCH_GROUP) */
65    public const int FETCH_GROUP = UNKNOWN;
66    /** @cvalue LONG_CONST(PDO_FETCH_UNIQUE) */
67    public const int FETCH_UNIQUE = UNKNOWN;
68    /** @cvalue LONG_CONST(PDO_FETCH_KEY_PAIR) */
69    public const int FETCH_KEY_PAIR = UNKNOWN;
70    /** @cvalue LONG_CONST(PDO_FETCH_CLASSTYPE) */
71    public const int FETCH_CLASSTYPE = UNKNOWN;
72
73    /** @cvalue LONG_CONST(PDO_FETCH_SERIALIZE) */
74    public const int FETCH_SERIALIZE = UNKNOWN;
75    /** @cvalue LONG_CONST(PDO_FETCH_PROPS_LATE) */
76    public const int FETCH_PROPS_LATE = UNKNOWN;
77    /** @cvalue LONG_CONST(PDO_FETCH_NAMED) */
78    public const int FETCH_NAMED = UNKNOWN;
79
80    /** @cvalue LONG_CONST(PDO_ATTR_AUTOCOMMIT) */
81    public const int ATTR_AUTOCOMMIT = UNKNOWN;
82    /** @cvalue LONG_CONST(PDO_ATTR_PREFETCH) */
83    public const int ATTR_PREFETCH = UNKNOWN;
84    /** @cvalue LONG_CONST(PDO_ATTR_TIMEOUT) */
85    public const int ATTR_TIMEOUT = UNKNOWN;
86    /** @cvalue LONG_CONST(PDO_ATTR_ERRMODE) */
87    public const int ATTR_ERRMODE = UNKNOWN;
88    /** @cvalue LONG_CONST(PDO_ATTR_SERVER_VERSION) */
89    public const int ATTR_SERVER_VERSION = UNKNOWN;
90    /** @cvalue LONG_CONST(PDO_ATTR_CLIENT_VERSION) */
91    public const int ATTR_CLIENT_VERSION = UNKNOWN;
92    /** @cvalue LONG_CONST(PDO_ATTR_SERVER_INFO) */
93    public const int ATTR_SERVER_INFO = UNKNOWN;
94    /** @cvalue LONG_CONST(PDO_ATTR_CONNECTION_STATUS) */
95    public const int ATTR_CONNECTION_STATUS = UNKNOWN;
96    /** @cvalue LONG_CONST(PDO_ATTR_CASE) */
97    public const int ATTR_CASE = UNKNOWN;
98    /** @cvalue LONG_CONST(PDO_ATTR_CURSOR_NAME) */
99    public const int ATTR_CURSOR_NAME = UNKNOWN;
100    /** @cvalue LONG_CONST(PDO_ATTR_CURSOR) */
101    public const int ATTR_CURSOR = UNKNOWN;
102    /** @cvalue LONG_CONST(PDO_ATTR_ORACLE_NULLS) */
103    public const int ATTR_ORACLE_NULLS = UNKNOWN;
104    /** @cvalue LONG_CONST(PDO_ATTR_PERSISTENT) */
105    public const int ATTR_PERSISTENT = UNKNOWN;
106    /** @cvalue LONG_CONST(PDO_ATTR_STATEMENT_CLASS) */
107    public const int ATTR_STATEMENT_CLASS = UNKNOWN;
108    /** @cvalue LONG_CONST(PDO_ATTR_FETCH_TABLE_NAMES) */
109    public const int ATTR_FETCH_TABLE_NAMES = UNKNOWN;
110    /** @cvalue LONG_CONST(PDO_ATTR_FETCH_CATALOG_NAMES) */
111    public const int ATTR_FETCH_CATALOG_NAMES = UNKNOWN;
112    /** @cvalue LONG_CONST(PDO_ATTR_DRIVER_NAME) */
113    public const int ATTR_DRIVER_NAME = UNKNOWN;
114    /** @cvalue LONG_CONST(PDO_ATTR_STRINGIFY_FETCHES) */
115    public const int ATTR_STRINGIFY_FETCHES = UNKNOWN;
116    /** @cvalue LONG_CONST(PDO_ATTR_MAX_COLUMN_LEN) */
117    public const int ATTR_MAX_COLUMN_LEN = UNKNOWN;
118    /** @cvalue LONG_CONST(PDO_ATTR_EMULATE_PREPARES) */
119    public const int ATTR_EMULATE_PREPARES = UNKNOWN;
120    /** @cvalue LONG_CONST(PDO_ATTR_DEFAULT_FETCH_MODE) */
121    public const int ATTR_DEFAULT_FETCH_MODE = UNKNOWN;
122    /** @cvalue LONG_CONST(PDO_ATTR_DEFAULT_STR_PARAM) */
123    public const int ATTR_DEFAULT_STR_PARAM = UNKNOWN;
124
125    /** @cvalue LONG_CONST(PDO_ERRMODE_SILENT) */
126    public const int ERRMODE_SILENT = UNKNOWN;
127    /** @cvalue LONG_CONST(PDO_ERRMODE_WARNING) */
128    public const int ERRMODE_WARNING = UNKNOWN;
129    /** @cvalue LONG_CONST(PDO_ERRMODE_EXCEPTION) */
130    public const int ERRMODE_EXCEPTION = UNKNOWN;
131
132    /** @cvalue LONG_CONST(PDO_CASE_NATURAL) */
133    public const int CASE_NATURAL = UNKNOWN;
134    /** @cvalue LONG_CONST(PDO_CASE_LOWER) */
135    public const int CASE_LOWER = UNKNOWN;
136    /** @cvalue LONG_CONST(PDO_CASE_UPPER) */
137    public const int CASE_UPPER = UNKNOWN;
138
139    /** @cvalue LONG_CONST(PDO_NULL_NATURAL) */
140    public const int NULL_NATURAL = UNKNOWN;
141    /** @cvalue LONG_CONST(PDO_NULL_EMPTY_STRING) */
142    public const int NULL_EMPTY_STRING = UNKNOWN;
143    /** @cvalue LONG_CONST(PDO_NULL_TO_STRING) */
144    public const int NULL_TO_STRING = UNKNOWN;
145
146    /** @cvalue PDO_ERR_NONE */
147    public const string ERR_NONE = UNKNOWN;
148
149    /** @cvalue LONG_CONST(PDO_FETCH_ORI_NEXT) */
150    public const int FETCH_ORI_NEXT = UNKNOWN;
151    /** @cvalue LONG_CONST(PDO_FETCH_ORI_PRIOR) */
152    public const int FETCH_ORI_PRIOR = UNKNOWN;
153    /** @cvalue LONG_CONST(PDO_FETCH_ORI_FIRST) */
154    public const int FETCH_ORI_FIRST = UNKNOWN;
155    /** @cvalue LONG_CONST(PDO_FETCH_ORI_LAST) */
156    public const int FETCH_ORI_LAST = UNKNOWN;
157    /** @cvalue LONG_CONST(PDO_FETCH_ORI_ABS) */
158    public const int FETCH_ORI_ABS = UNKNOWN;
159    /** @cvalue LONG_CONST(PDO_FETCH_ORI_REL) */
160    public const int FETCH_ORI_REL = UNKNOWN;
161
162    /** @cvalue LONG_CONST(PDO_CURSOR_FWDONLY) */
163    public const int CURSOR_FWDONLY = UNKNOWN;
164    /** @cvalue LONG_CONST(PDO_CURSOR_SCROLL) */
165    public const int CURSOR_SCROLL = UNKNOWN;
166
167    public function __construct(string $dsn, ?string $username = null, #[\SensitiveParameter] ?string $password = null, ?array $options = null) {}
168
169    public static function connect(
170        string $dsn,
171        ?string $username = null,
172        #[\SensitiveParameter] ?string $password = null,
173        ?array $options = null
174    ): static {}
175
176    /** @tentative-return-type */
177    public function beginTransaction(): bool {}
178
179    /** @tentative-return-type */
180    public function commit(): bool {}
181
182    /** @tentative-return-type */
183    public function errorCode(): ?string {}
184
185    /** @tentative-return-type */
186    public function errorInfo(): array {}
187
188    /** @tentative-return-type */
189    public function exec(string $statement): int|false {}
190
191    /** @tentative-return-type */
192    public function getAttribute(int $attribute): mixed {}
193
194    /** @tentative-return-type */
195    public static function getAvailableDrivers(): array {}
196
197    /** @tentative-return-type */
198    public function inTransaction(): bool {}
199
200    /** @tentative-return-type */
201    public function lastInsertId(?string $name = null): string|false {}
202
203    /** @tentative-return-type */
204    public function prepare(string $query, array $options = []): PDOStatement|false {}
205
206    /** @tentative-return-type */
207    public function query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs): PDOStatement|false {}
208
209    /** @tentative-return-type */
210    public function quote(string $string, int $type = PDO::PARAM_STR): string|false {}
211
212    /** @tentative-return-type */
213    public function rollBack(): bool {}
214
215    /** @tentative-return-type */
216    public function setAttribute(int $attribute, mixed $value): bool {}
217}
218