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