-
Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathodbc.stub.php
445 lines (377 loc) · 11.1 KB
/
odbc.stub.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
<?php
/** @generate-class-entries */
namespace Odbc {
/**
* @strict-properties
* @not-serializable
*/
class Connection
{
}
/**
* @strict-properties
* @not-serializable
*/
class Result
{
}
}
namespace {
/**
* @var string
* @cvalue PHP_ODBC_TYPE
*/
const ODBC_TYPE = UNKNOWN;
/**
* @var int
* @cvalue PHP_ODBC_BINMODE_PASSTHRU
*/
const ODBC_BINMODE_PASSTHRU = UNKNOWN;
/**
* @var int
* @cvalue PHP_ODBC_BINMODE_RETURN
*/
const ODBC_BINMODE_RETURN = UNKNOWN;
/**
* @var int
* @cvalue PHP_ODBC_BINMODE_CONVERT
*/
const ODBC_BINMODE_CONVERT = UNKNOWN;
/* Define Constants for options. These Constants are defined in <sqlext.h> */
/**
* @var int
* @cvalue SQL_ODBC_CURSORS
*/
const SQL_ODBC_CURSORS = UNKNOWN;
/**
* @var int
* @cvalue SQL_CUR_USE_DRIVER
*/
const SQL_CUR_USE_DRIVER = UNKNOWN;
/**
* @var int
* @cvalue SQL_CUR_USE_IF_NEEDED
*/
const SQL_CUR_USE_IF_NEEDED = UNKNOWN;
/**
* @var int
* @cvalue SQL_CUR_USE_ODBC
*/
const SQL_CUR_USE_ODBC = UNKNOWN;
/**
* @var int
* @cvalue SQL_CONCURRENCY
*/
const SQL_CONCURRENCY = UNKNOWN;
/**
* @var int
* @cvalue SQL_CONCUR_READ_ONLY
*/
const SQL_CONCUR_READ_ONLY = UNKNOWN;
/**
* @var int
* @cvalue SQL_CONCUR_LOCK
*/
const SQL_CONCUR_LOCK = UNKNOWN;
/**
* @var int
* @cvalue SQL_CONCUR_ROWVER
*/
const SQL_CONCUR_ROWVER = UNKNOWN;
/**
* @var int
* @cvalue SQL_CONCUR_VALUES
*/
const SQL_CONCUR_VALUES = UNKNOWN;
/**
* @var int
* @cvalue SQL_CURSOR_TYPE
*/
const SQL_CURSOR_TYPE = UNKNOWN;
/**
* @var int
* @cvalue SQL_CURSOR_FORWARD_ONLY
*/
const SQL_CURSOR_FORWARD_ONLY = UNKNOWN;
/**
* @var int
* @cvalue SQL_CURSOR_KEYSET_DRIVEN
*/
const SQL_CURSOR_KEYSET_DRIVEN = UNKNOWN;
/**
* @var int
* @cvalue SQL_CURSOR_DYNAMIC
*/
const SQL_CURSOR_DYNAMIC = UNKNOWN;
/**
* @var int
* @cvalue SQL_CURSOR_STATIC
*/
const SQL_CURSOR_STATIC = UNKNOWN;
/**
* @var int
* @cvalue SQL_KEYSET_SIZE
*/
const SQL_KEYSET_SIZE = UNKNOWN;
/* these are for the Data Source type */
/**
* @var int
* @cvalue SQL_FETCH_FIRST
*/
const SQL_FETCH_FIRST = UNKNOWN;
/**
* @var int
* @cvalue SQL_FETCH_NEXT
*/
const SQL_FETCH_NEXT = UNKNOWN;
/* register the standard data types */
/**
* @var int
* @cvalue SQL_CHAR
*/
const SQL_CHAR = UNKNOWN;
/**
* @var int
* @cvalue SQL_VARCHAR
*/
const SQL_VARCHAR = UNKNOWN;
/**
* @var int
* @cvalue SQL_LONGVARCHAR
*/
const SQL_LONGVARCHAR = UNKNOWN;
/**
* @var int
* @cvalue SQL_DECIMAL
*/
const SQL_DECIMAL = UNKNOWN;
/**
* @var int
* @cvalue SQL_NUMERIC
*/
const SQL_NUMERIC = UNKNOWN;
/**
* @var int
* @cvalue SQL_BIT
*/
const SQL_BIT = UNKNOWN;
/**
* @var int
* @cvalue SQL_TINYINT
*/
const SQL_TINYINT = UNKNOWN;
/**
* @var int
* @cvalue SQL_SMALLINT
*/
const SQL_SMALLINT = UNKNOWN;
/**
* @var int
* @cvalue SQL_INTEGER
*/
const SQL_INTEGER = UNKNOWN;
/**
* @var int
* @cvalue SQL_BIGINT
*/
const SQL_BIGINT = UNKNOWN;
/**
* @var int
* @cvalue SQL_REAL
*/
const SQL_REAL = UNKNOWN;
/**
* @var int
* @cvalue SQL_FLOAT
*/
const SQL_FLOAT = UNKNOWN;
/**
* @var int
* @cvalue SQL_DOUBLE
*/
const SQL_DOUBLE = UNKNOWN;
/**
* @var int
* @cvalue SQL_BINARY
*/
const SQL_BINARY = UNKNOWN;
/**
* @var int
* @cvalue SQL_VARBINARY
*/
const SQL_VARBINARY = UNKNOWN;
/**
* @var int
* @cvalue SQL_LONGVARBINARY
*/
const SQL_LONGVARBINARY = UNKNOWN;
/**
* @var int
* @cvalue SQL_DATE
*/
const SQL_DATE = UNKNOWN;
/**
* @var int
* @cvalue SQL_TIME
*/
const SQL_TIME = UNKNOWN;
/**
* @var int
* @cvalue SQL_TIMESTAMP
*/
const SQL_TIMESTAMP = UNKNOWN;
#if (defined(ODBCVER) && (ODBCVER >= 0x0300))
/**
* @var int
* @cvalue SQL_TYPE_DATE
*/
const SQL_TYPE_DATE = UNKNOWN;
/**
* @var int
* @cvalue SQL_TYPE_TIME
*/
const SQL_TYPE_TIME = UNKNOWN;
/**
* @var int
* @cvalue SQL_TYPE_TIMESTAMP
*/
const SQL_TYPE_TIMESTAMP = UNKNOWN;
/**
* @var int
* @cvalue SQL_WCHAR
*/
const SQL_WCHAR = UNKNOWN;
/**
* @var int
* @cvalue SQL_WVARCHAR
*/
const SQL_WVARCHAR = UNKNOWN;
/**
* @var int
* @cvalue SQL_WLONGVARCHAR
*/
const SQL_WLONGVARCHAR = UNKNOWN;
/* SQLSpecialColumns values */
/**
* @var int
* @cvalue SQL_BEST_ROWID
*/
const SQL_BEST_ROWID = UNKNOWN;
/**
* @var int
* @cvalue SQL_ROWVER
*/
const SQL_ROWVER = UNKNOWN;
/**
* @var int
* @cvalue SQL_SCOPE_CURROW
*/
const SQL_SCOPE_CURROW = UNKNOWN;
/**
* @var int
* @cvalue SQL_SCOPE_TRANSACTION
*/
const SQL_SCOPE_TRANSACTION = UNKNOWN;
/**
* @var int
* @cvalue SQL_SCOPE_SESSION
*/
const SQL_SCOPE_SESSION = UNKNOWN;
/**
* @var int
* @cvalue SQL_NO_NULLS
*/
const SQL_NO_NULLS = UNKNOWN;
/**
* @var int
* @cvalue SQL_NULLABLE
*/
const SQL_NULLABLE = UNKNOWN;
/* SQLStatistics values */
/**
* @var int
* @cvalue SQL_INDEX_UNIQUE
*/
const SQL_INDEX_UNIQUE = UNKNOWN;
/**
* @var int
* @cvalue SQL_INDEX_ALL
*/
const SQL_INDEX_ALL = UNKNOWN;
/**
* @var int
* @cvalue SQL_ENSURE
*/
const SQL_ENSURE = UNKNOWN;
/**
* @var int
* @cvalue SQL_QUICK
*/
const SQL_QUICK = UNKNOWN;
#endif
function odbc_close_all(): void {}
function odbc_binmode(Odbc\Result $statement, int $mode): true {}
function odbc_longreadlen(Odbc\Result $statement, int $length): true {}
function odbc_prepare(Odbc\Connection $odbc, string $query): Odbc\Result|false {}
function odbc_execute(Odbc\Result $statement, array $params = []): bool {}
function odbc_cursor(Odbc\Result $statement): string|false {}
#ifdef HAVE_SQLDATASOURCES
function odbc_data_source(Odbc\Connection $odbc, int $fetch_type): array|null|false {}
#endif
function odbc_exec(Odbc\Connection $odbc, string $query): Odbc\Result|false {}
/** @alias odbc_exec */
function odbc_do(Odbc\Connection $odbc, string $query): Odbc\Result|false {}
#ifdef PHP_ODBC_HAVE_FETCH_HASH
function odbc_fetch_object(Odbc\Result $statement, ?int $row = null): stdClass|false {}
function odbc_fetch_array(Odbc\Result $statement, ?int $row = null): array|false {}
#endif
/**
* @param array $array
*/
function odbc_fetch_into(Odbc\Result $statement, &$array, ?int $row = null): int|false {}
function odbc_fetch_row(Odbc\Result $statement, ?int $row = null): bool {}
function odbc_result(Odbc\Result $statement, string|int $field): string|bool|null {}
#[\Deprecated(since: '8.1')]
function odbc_result_all(Odbc\Result $statement, string $format = ""): int|false {}
function odbc_free_result(Odbc\Result $statement): true {}
function odbc_connect(string $dsn, ?string $user = null, #[\SensitiveParameter] ?string $password = null, int $cursor_option = SQL_CUR_USE_DRIVER): Odbc\Connection|false {}
function odbc_pconnect(string $dsn, ?string $user = null, #[\SensitiveParameter] ?string $password = null, int $cursor_option = SQL_CUR_USE_DRIVER): Odbc\Connection|false {}
function odbc_close(Odbc\Connection $odbc): void {}
function odbc_num_rows(Odbc\Result $statement): int {}
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
function odbc_next_result(Odbc\Result $statement): bool {}
#endif
function odbc_num_fields(Odbc\Result $statement): int {}
function odbc_field_name(Odbc\Result $statement, int $field): string|false {}
function odbc_field_type(Odbc\Result $statement, int $field): string|false {}
function odbc_field_len(Odbc\Result $statement, int $field): int|false {}
/** @alias odbc_field_len */
function odbc_field_precision(Odbc\Result $statement, int $field): int|false {}
function odbc_field_scale(Odbc\Result $statement, int $field): int|false {}
function odbc_field_num(Odbc\Result $statement, string $field): int|false {}
function odbc_autocommit(Odbc\Connection $odbc, ?bool $enable = null): int|bool {}
function odbc_commit(Odbc\Connection $odbc): bool {}
function odbc_rollback(Odbc\Connection $odbc): bool {}
function odbc_error(?Odbc\Connection $odbc = null): string {}
function odbc_errormsg(?Odbc\Connection $odbc = null): string {}
function odbc_setoption(Odbc\Connection|Odbc\Result $odbc, int $which, int $option, int $value): bool {}
function odbc_tables(Odbc\Connection $odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $types = null): Odbc\Result|false {}
function odbc_columns(Odbc\Connection $odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $column = null): Odbc\Result|false {}
function odbc_gettypeinfo(Odbc\Connection $odbc, int $data_type = 0): Odbc\Result|false {}
function odbc_primarykeys(Odbc\Connection $odbc, ?string $catalog, string $schema, string $table): Odbc\Result|false {}
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
function odbc_procedurecolumns(Odbc\Connection $odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null, ?string $column = null): Odbc\Result|false {}
function odbc_procedures(Odbc\Connection $odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null): Odbc\Result|false {}
function odbc_foreignkeys(Odbc\Connection $odbc, ?string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table): Odbc\Result|false {}
#endif
function odbc_specialcolumns(Odbc\Connection $odbc, int $type, ?string $catalog, string $schema, string $table, int $scope, int $nullable): Odbc\Result|false {}
function odbc_statistics(Odbc\Connection $odbc, ?string $catalog, string $schema, string $table, int $unique, int $accuracy): Odbc\Result|false {}
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
function odbc_tableprivileges(Odbc\Connection $odbc, ?string $catalog, string $schema, string $table): Odbc\Result|false {}
function odbc_columnprivileges(Odbc\Connection $odbc, ?string $catalog, string $schema, string $table, string $column): Odbc\Result|false {}
#endif
/* odbc_utils.c */
function odbc_connection_string_is_quoted(string $str): bool {}
function odbc_connection_string_should_quote(string $str): bool {}
function odbc_connection_string_quote(string $str): string {}
}