Skip to content

Commit 0201a85

Browse files
committed
Add ext/odbc stubs
1 parent 6323c13 commit 0201a85

File tree

3 files changed

+476
-257
lines changed

3 files changed

+476
-257
lines changed

ext/odbc/odbc.stub.php

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
<?php
2+
3+
function odbc_close_all(): void {}
4+
5+
/** @param resource $result_id */
6+
function odbc_binmode($result_id, int $mode): bool {}
7+
8+
/** @param resource $result_id */
9+
function odbc_longreadlen($result_id, int $length): bool {}
10+
11+
/**
12+
* @param resource $result_id
13+
* @return resource|false
14+
*/
15+
function odbc_prepare($connection_id, string $query) {}
16+
17+
/** @param resource $result_id */
18+
function odbc_execute($result_id, array $parameters_array = UNKNOWN): bool {}
19+
20+
/**
21+
* @param resource $result_id
22+
* @return string|false
23+
*/
24+
function odbc_cursor($result_id) {}
25+
26+
#ifdef HAVE_SQLDATASOURCES
27+
/**
28+
* @param resource $connection_id
29+
* @return array|false
30+
*/
31+
function odbc_data_source($connection_id, int $fetch_type) {}
32+
#endif
33+
34+
/**
35+
* @param resource $connection_id
36+
* @return resource|false
37+
*/
38+
function odbc_exec($connection_id, string $query, int $flags = UNKNOWN) {}
39+
40+
/**
41+
* @param resource $connection_id
42+
* @return resource|false
43+
*/
44+
function odbc_do($connection_id, string $query, int $flags = UNKNOWN) {}
45+
46+
#ifdef PHP_ODBC_HAVE_FETCH_HASH
47+
/**
48+
* @param resource $result
49+
* @return stdClass|false
50+
*/
51+
function odbc_fetch_object($result, int $rownumber = -1) {}
52+
53+
/**
54+
* @param resource $result
55+
* @return array|false
56+
*/
57+
function odbc_fetch_array($result, int $rownumber = -1) {}
58+
#endif
59+
60+
/**
61+
* @param resource $result_id
62+
* @return int|false
63+
*/
64+
function odbc_fetch_into($result_id, &$result_array, int $rownumber = 0) {}
65+
66+
/** @param resource $result_id */
67+
function odbc_fetch_row($result_id, int $row_number = UNKNOWN): bool {}
68+
69+
/**
70+
* @param resource $result_id
71+
* @param string|int $field
72+
* @return string|bool|null
73+
*/
74+
function odbc_result($result_id, $field) {}
75+
76+
/**
77+
* @param resource $result_id
78+
* @return int|false
79+
*/
80+
function odbc_result_all($result_id, string $format = '') {}
81+
82+
/** @param resource $result_id */
83+
function odbc_free_result($result_id): bool {}
84+
85+
/** @return resource|false */
86+
function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {}
87+
88+
/** @return resource|false */
89+
function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {}
90+
91+
/** @param resource $connection_id */
92+
function odbc_close($connection_id): void {}
93+
94+
/** @param resource $result_id */
95+
function odbc_num_rows($result_id): int {}
96+
97+
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
98+
/** @param resource $result_id */
99+
function odbc_next_result($result_id): bool {}
100+
#endif
101+
102+
/** @param resource $result_id */
103+
function odbc_num_fields($result_id): int {}
104+
105+
/**
106+
* @param resource $result_id
107+
* @return string|false
108+
*/
109+
function odbc_field_name($result_id, int $field_number) {}
110+
111+
/**
112+
* @param resource $result_id
113+
* @return string|false
114+
*/
115+
function odbc_field_type($result_id, int $field_number) {}
116+
117+
/**
118+
* @param resource $result_id
119+
* @return int|false
120+
*/
121+
function odbc_field_len($result_id, int $field_number) {}
122+
123+
/**
124+
* @param resource $result_id
125+
* @return int|false
126+
*/
127+
function odbc_field_precision($result_id, int $field_number) {}
128+
129+
/**
130+
* @param resource $result_id
131+
* @return int|false
132+
*/
133+
function odbc_field_scale($result_id, int $field_number) {}
134+
135+
/**
136+
* @param resource $result_id
137+
* @return int|false
138+
*/
139+
function odbc_field_num($result_id, string $field_name) {}
140+
141+
/**
142+
* @param resource $connection_id
143+
* @return int|bool
144+
*/
145+
function odbc_autocommit($connection_id, int $onoff = 0) {}
146+
147+
/** @param resource $connection_id */
148+
function odbc_commit($connection_id): bool {}
149+
150+
/** @param resource $connection_id */
151+
function odbc_rollback($connection_id): bool {}
152+
153+
/** @param resource $connection_id */
154+
function odbc_error($connection_id = UNKNOWN): string {}
155+
156+
/** @param resource $connection_id */
157+
function odbc_errormsg($connection_id = UNKNOWN): string {}
158+
159+
/** @param resource $conn_id */
160+
function odbc_setoption($conn_id, int $which, int $option, int $value): bool {}
161+
162+
/**
163+
* @param resource $connection_id
164+
* @return resource|false
165+
*/
166+
function odbc_tables($connection_id, string $qualfier = UNKNOWN, string $owner = UNKNOWN, string $name = UNKNOWN, string $table_types = UNKNOWN) {}
167+
168+
/**
169+
* @param resource $connection_id
170+
* @return resource|false
171+
*/
172+
function odbc_columns($connection_id, string $qualifier = UNKNOWN, string $owner = UNKNOWN, string $table_name = UNKNOWN, string $column_name = UNKNOWN) {}
173+
174+
/**
175+
* @param resource $connection_id
176+
* @return resource|false
177+
*/
178+
function odbc_gettypeinfo($connection_id, int $data_type = 0) {}
179+
180+
/**
181+
* @param resource $connection_id
182+
* @return resource|false
183+
*/
184+
function odbc_primarykeys($connection_id, string $qualifier, string $owner, string $table) {}
185+
186+
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
187+
/**
188+
* @param resource $connection_id
189+
* @return resource|false
190+
*/
191+
function odbc_procedurecolumns($connection_id, string $qualifier = UNKNOWN, string $owner = UNKNOWN, string $proc = UNKNOWN, string $column = UNKNOWN) {}
192+
193+
/**
194+
* @param resource $connection_id
195+
* @return resource|false
196+
*/
197+
function odbc_procedures($connection_id, string $qualifier = UNKNOWN, string $owner = UNKNOWN, string $name = UNKNOWN) {}
198+
199+
/**
200+
* @param resource $connection_id
201+
* @return resource|false
202+
*/
203+
function odbc_foreignkeys($connection_id, string $pk_qualifier, string $pk_owner, string $pk_table, string $fk_qualifier, string $fk_owner, string $fk_table) {}
204+
#endif
205+
206+
/**
207+
* @see https://bugs.php.net/bug.php?id=78470
208+
* @param resource $connection_id
209+
* @return resource|false
210+
*/
211+
function odbc_specialcolumns($connection_id, int $type, string $qualifier, string $owner, string $table, int $scope) {}
212+
213+
/**
214+
* @param resource $connection_id
215+
* @return resource|false
216+
*/
217+
function odbc_statistics($connection_id, string $qualfier, string $owner, string $name, int $unique, int $accuracy) {}
218+
219+
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
220+
/**
221+
* @param resource $connection_id
222+
* @return resource|false
223+
*/
224+
function odbc_tableprivileges($connection_id, string $qualifier, string $owner, string $name) {}
225+
226+
/**
227+
* @param resource $connection_id
228+
* @return resource|false
229+
*/
230+
function odbc_columnprivileges($connection_id, string $catalog, string $schema, string $table, string $column) {}
231+
#endif

0 commit comments

Comments
 (0)