forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathodbc.stub.php
More file actions
521 lines (453 loc) · 10.4 KB
/
Copy pathodbc.stub.php
File metadata and controls
521 lines (453 loc) · 10.4 KB
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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
<?php
/** @generate-class-entries */
/**
* @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 {}
/** @param resource $statement */
function odbc_binmode($statement, int $mode): true {}
/** @param resource $statement */
function odbc_longreadlen($statement, int $length): true {}
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_prepare($odbc, string $query) {}
/** @param resource $statement */
function odbc_execute($statement, array $params = []): bool {}
/** @param resource $statement */
function odbc_cursor($statement): string|false {}
#ifdef HAVE_SQLDATASOURCES
/** @param resource $odbc */
function odbc_data_source($odbc, int $fetch_type): array|null|false {}
#endif
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_exec($odbc, string $query) {}
/**
* @param resource $odbc
* @return resource|false
* @alias odbc_exec
*/
function odbc_do($odbc, string $query) {}
#ifdef PHP_ODBC_HAVE_FETCH_HASH
/** @param resource $statement */
function odbc_fetch_object($statement, ?int $row = null): stdClass|false {}
/** @param resource $statement */
function odbc_fetch_array($statement, ?int $row = null): array|false {}
#endif
/**
* @param resource $statement
* @param array $array
*/
function odbc_fetch_into($statement, &$array, ?int $row = null): int|false {}
/** @param resource $statement */
function odbc_fetch_row($statement, ?int $row = null): bool {}
/** @param resource $statement */
function odbc_result($statement, string|int $field): string|bool|null {}
/**
* @param resource $statement
* @deprecated
*/
function odbc_result_all($statement, string $format = ""): int|false {}
/** @param resource $statement */
function odbc_free_result($statement): true {}
/**
* @return resource|false
*/
function odbc_connect(string $dsn, ?string $user = null, #[\SensitiveParameter] ?string $password = null, int $cursor_option = SQL_CUR_USE_DRIVER) {}
/**
* @return resource|false
*/
function odbc_pconnect(string $dsn, ?string $user = null, #[\SensitiveParameter] ?string $password = null, int $cursor_option = SQL_CUR_USE_DRIVER) {}
/** @param resource $odbc */
function odbc_close($odbc): void {}
/** @param resource $statement */
function odbc_num_rows($statement): int {}
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
/** @param resource $statement */
function odbc_next_result($statement): bool {}
#endif
/** @param resource $statement */
function odbc_num_fields($statement): int {}
/** @param resource $statement */
function odbc_field_name($statement, int $field): string|false {}
/** @param resource $statement */
function odbc_field_type($statement, int $field): string|false {}
/** @param resource $statement */
function odbc_field_len($statement, int $field): int|false {}
/**
* @param resource $statement
* @alias odbc_field_len
*/
function odbc_field_precision($statement, int $field): int|false {}
/** @param resource $statement */
function odbc_field_scale($statement, int $field): int|false {}
/** @param resource $statement */
function odbc_field_num($statement, string $field): int|false {}
/** @param resource $odbc */
function odbc_autocommit($odbc, ?bool $enable = null): int|bool {}
/** @param resource $odbc */
function odbc_commit($odbc): bool {}
/** @param resource $odbc */
function odbc_rollback($odbc): bool {}
/** @param resource|null $odbc */
function odbc_error($odbc = null): string {}
/** @param resource|null $odbc */
function odbc_errormsg($odbc = null): string {}
/** @param resource $odbc */
function odbc_setoption($odbc, int $which, int $option, int $value): bool {}
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_tables($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $types = null) {}
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_columns($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $column = null) {}
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_gettypeinfo($odbc, int $data_type = 0) {}
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_primarykeys($odbc, ?string $catalog, string $schema, string $table) {}
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null, ?string $column = null) {}
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null) {}
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_foreignkeys($odbc, ?string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) {}
#endif
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_specialcolumns($odbc, int $type, ?string $catalog, string $schema, string $table, int $scope, int $nullable) {}
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_statistics($odbc, ?string $catalog, string $schema, string $table, int $unique, int $accuracy) {}
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_tableprivileges($odbc, ?string $catalog, string $schema, string $table) {}
/**
* @param resource $odbc
* @return resource|false
*/
function odbc_columnprivileges($odbc, ?string $catalog, string $schema, string $table, string $column) {}
#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 {}