xref: /PHP-8.1/ext/odbc/odbc.stub.php (revision 77252afa)
1<?php
2
3/** @generate-class-entries */
4
5function odbc_close_all(): void {}
6
7/** @param resource $statement */
8function odbc_binmode($statement, int $mode): bool {}
9
10/** @param resource $statement */
11function odbc_longreadlen($statement, int $length): bool {}
12
13/**
14 * @param resource $odbc
15 * @return resource|false
16 */
17function odbc_prepare($odbc, string $query) {}
18
19/** @param resource $statement */
20function odbc_execute($statement, array $params = []): bool {}
21
22/** @param resource $statement */
23function odbc_cursor($statement): string|false {}
24
25#ifdef HAVE_SQLDATASOURCES
26/** @param resource $odbc */
27function odbc_data_source($odbc, int $fetch_type): array|null|false {}
28#endif
29
30/**
31 * @param resource $odbc
32 * @return resource|false
33 */
34function odbc_exec($odbc, string $query) {}
35
36/**
37 * @param resource $odbc
38 * @return resource|false
39 * @alias odbc_exec
40 */
41function odbc_do($odbc, string $query) {}
42
43#ifdef PHP_ODBC_HAVE_FETCH_HASH
44/** @param resource $statement */
45function odbc_fetch_object($statement, int $row = -1): stdClass|false {}
46
47/** @param resource $statement */
48function odbc_fetch_array($statement, int $row = -1): array|false {}
49#endif
50
51/**
52 * @param resource $statement
53 * @param array $array
54 */
55function odbc_fetch_into($statement, &$array, int $row = 0): int|false {}
56
57/** @param resource $statement */
58function odbc_fetch_row($statement, ?int $row = null): bool {}
59
60/** @param resource $statement */
61function odbc_result($statement, string|int $field): string|bool|null {}
62
63/**
64 * @param resource $statement
65 * @deprecated
66 */
67function odbc_result_all($statement, string $format = ""): int|false {}
68
69/** @param resource $statement */
70function odbc_free_result($statement): bool {}
71
72/** @return resource|false */
73function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {}
74
75/** @return resource|false */
76function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {}
77
78/** @param resource $odbc */
79function odbc_close($odbc): void {}
80
81/** @param resource $statement */
82function odbc_num_rows($statement): int {}
83
84#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
85/** @param resource $statement */
86function odbc_next_result($statement): bool {}
87#endif
88
89/** @param resource $statement */
90function odbc_num_fields($statement): int {}
91
92/** @param resource $statement */
93function odbc_field_name($statement, int $field): string|false {}
94
95/** @param resource $statement */
96function odbc_field_type($statement, int $field): string|false {}
97
98/** @param resource $statement */
99function odbc_field_len($statement, int $field): int|false {}
100
101/**
102 * @param resource $statement
103 * @alias odbc_field_len
104 */
105function odbc_field_precision($statement, int $field): int|false {}
106
107/** @param resource $statement */
108function odbc_field_scale($statement, int $field): int|false {}
109
110/** @param resource $statement */
111function odbc_field_num($statement, string $field): int|false {}
112
113/** @param resource $odbc */
114function odbc_autocommit($odbc, bool $enable = false): int|bool {}
115
116/** @param resource $odbc */
117function odbc_commit($odbc): bool {}
118
119/** @param resource $odbc */
120function odbc_rollback($odbc): bool {}
121
122/** @param resource|null $odbc */
123function odbc_error($odbc = null): string {}
124
125/** @param resource|null $odbc */
126function odbc_errormsg($odbc = null): string {}
127
128/** @param resource $odbc */
129function odbc_setoption($odbc, int $which, int $option, int $value): bool {}
130
131/**
132 * @param resource $odbc
133 * @return resource|false
134 */
135function odbc_tables($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $types = null) {}
136
137/**
138 * @param resource $odbc
139 * @return resource|false
140 */
141function odbc_columns($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $column = null) {}
142
143/**
144 * @param resource $odbc
145 * @return resource|false
146 */
147function odbc_gettypeinfo($odbc, int $data_type = 0) {}
148
149/**
150 * @param resource $odbc
151 * @return resource|false
152 */
153function odbc_primarykeys($odbc, ?string $catalog, string $schema, string $table) {}
154
155#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
156/**
157 * @param resource $odbc
158 * @return resource|false
159 */
160function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null, ?string $column = null) {}
161
162/**
163 * @param resource $odbc
164 * @return resource|false
165 */
166function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null) {}
167
168/**
169 * @param resource $odbc
170 * @return resource|false
171 */
172function odbc_foreignkeys($odbc, ?string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) {}
173#endif
174
175/**
176 * @param resource $odbc
177 * @return resource|false
178 */
179function odbc_specialcolumns($odbc, int $type, ?string $catalog, string $schema, string $table, int $scope, int $nullable) {}
180
181/**
182 * @param resource $odbc
183 * @return resource|false
184 */
185function odbc_statistics($odbc, ?string $catalog, string $schema, string $table, int $unique, int $accuracy) {}
186
187#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
188/**
189 * @param resource $odbc
190 * @return resource|false
191 */
192function odbc_tableprivileges($odbc, ?string $catalog, string $schema, string $table) {}
193
194/**
195 * @param resource $odbc
196 * @return resource|false
197 */
198function odbc_columnprivileges($odbc, ?string $catalog, string $schema, string $table, string $column) {}
199#endif
200