forked from FirebirdSQL/php-firebird
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp_firebird.h
More file actions
executable file
·200 lines (170 loc) · 6.07 KB
/
Copy pathphp_firebird.h
File metadata and controls
executable file
·200 lines (170 loc) · 6.07 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
/* SPDX-License-Identifier: PHP-3.01
* SPDX-FileCopyrightText: The PHP Group and contributors (see CREDITS) */
#ifndef PHP_FIREBIRD_H
#define PHP_FIREBIRD_H
extern zend_module_entry firebird_module_entry;
#define phpext_firebird_ptr &firebird_module_entry
#include "ibase.h"
#ifndef FB_API_VER
static_assert(false, "FATAL: FB_API_VER is not defined. Assumed very old, unsupported client library");
#endif
/* Version string: defined by configure script via AC_DEFINE_UNQUOTED.
* Fallback for manual builds or missing configure detection. */
#ifndef PHP_FIREBIRD_VERSION_STRING
# define PHP_FIREBIRD_VERSION_STRING "0.0.0-unknown"
#endif
/* Legacy compatibility macro (use PHP_FIREBIRD_VERSION_STRING in new code) */
#define PHP_FIREBIRD_VER_STR PHP_FIREBIRD_VERSION_STRING
/* Numeric version for the FBIRD_VER constant (two-digit style like FB_API_VER).
* This is a simplified value; for full version info use PHP_FIREBIRD_VERSION_STRING. */
#ifndef PHP_FIREBIRD_VER
# define PHP_FIREBIRD_VER 100 /* 10.x series */
#endif
PHP_MINIT_FUNCTION(fbird);
PHP_RINIT_FUNCTION(fbird);
PHP_MSHUTDOWN_FUNCTION(fbird);
PHP_RSHUTDOWN_FUNCTION(fbird);
PHP_MINFO_FUNCTION(fbird);
PHP_FUNCTION(fbird_connect);
PHP_FUNCTION(fbird_pconnect);
PHP_FUNCTION(fbird_close);
PHP_FUNCTION(fbird_ping);
PHP_FUNCTION(fbird_server_version);
PHP_FUNCTION(fbird_drop_db);
PHP_FUNCTION(fbird_create_database);
PHP_FUNCTION(fbird_prepare_ex);
PHP_FUNCTION(fbird_query);
PHP_FUNCTION(fbird_multi_query);
PHP_FUNCTION(fbird_fetch_row);
PHP_FUNCTION(fbird_fetch_assoc);
PHP_FUNCTION(fbird_fetch_array);
PHP_FUNCTION(fbird_fetch_object);
PHP_FUNCTION(fbird_data_seek);
PHP_FUNCTION(fbird_fetch_all);
PHP_FUNCTION(fbird_fetch_column);
PHP_FUNCTION(fbird_stmt_reset);
PHP_FUNCTION(fbird_stmt_attr_get);
PHP_FUNCTION(fbird_stmt_attr_set);
PHP_FUNCTION(fbird_free_result);
PHP_FUNCTION(fbird_name_result);
PHP_FUNCTION(fbird_prepare);
PHP_FUNCTION(fbird_execute);
PHP_FUNCTION(fbird_free_query);
PHP_FUNCTION(fbird_execute_statement);
PHP_FUNCTION(fbird_execute_query);
PHP_FUNCTION(fbird_execute_auto);
PHP_FUNCTION(fbird_query_params_tx);
PHP_FUNCTION(fbird_gen_id);
PHP_FUNCTION(fbird_last_insert_id);
PHP_FUNCTION(fbird_num_fields);
PHP_FUNCTION(fbird_num_params);
PHP_FUNCTION(fbird_affected_rows);
PHP_FUNCTION(fbird_field_info);
PHP_FUNCTION(fbird_param_info);
PHP_FUNCTION(fbird_result_metadata);
PHP_FUNCTION(fbird_list_tables);
PHP_FUNCTION(fbird_list_fields);
PHP_FUNCTION(fbird_meta_data);
PHP_FUNCTION(fbird_trans);
PHP_FUNCTION(fbird_trans_start);
PHP_FUNCTION(fbird_commit);
PHP_FUNCTION(fbird_rollback);
PHP_FUNCTION(fbird_commit_ret);
PHP_FUNCTION(fbird_rollback_ret);
PHP_FUNCTION(fbird_savepoint);
PHP_FUNCTION(fbird_rollback_savepoint);
PHP_FUNCTION(fbird_release_savepoint);
PHP_FUNCTION(fbird_trans_info);
PHP_FUNCTION(fbird_connection_info);
PHP_FUNCTION(fbird_blob_create);
PHP_FUNCTION(fbird_blob_add);
PHP_FUNCTION(fbird_blob_cancel);
PHP_FUNCTION(fbird_blob_open);
PHP_FUNCTION(fbird_blob_get);
PHP_FUNCTION(fbird_blob_export);
PHP_FUNCTION(fbird_blob_close);
PHP_FUNCTION(fbird_blob_echo);
PHP_FUNCTION(fbird_blob_info);
PHP_FUNCTION(fbird_blob_import);
PHP_FUNCTION(fbird_blob_create_stream);
PHP_FUNCTION(fbird_blob_open_stream);
PHP_FUNCTION(fbird_blob_create_seekable);
PHP_FUNCTION(fbird_blob_open_seekable);
PHP_FUNCTION(fbird_blob_seek);
PHP_FUNCTION(fbird_add_user);
PHP_FUNCTION(fbird_modify_user);
PHP_FUNCTION(fbird_delete_user);
PHP_FUNCTION(fbird_service_attach);
PHP_FUNCTION(fbird_service_detach);
PHP_FUNCTION(fbird_backup);
PHP_FUNCTION(fbird_restore);
PHP_FUNCTION(fbird_maintain_db);
PHP_FUNCTION(fbird_db_info);
PHP_FUNCTION(fbird_server_info);
PHP_FUNCTION(fbird_errmsg);
PHP_FUNCTION(fbird_errcode);
PHP_FUNCTION(fbird_sqlstate);
PHP_FUNCTION(fbird_escape_string);
PHP_FUNCTION(fbird_escape_literal);
PHP_FUNCTION(fbird_escape_identifier);
/* Exception Mode API (PDO-style error handling) */
PHP_FUNCTION(fbird_set_exception_mode);
PHP_FUNCTION(fbird_get_exception_mode);
/* Exception mode constants */
#define FBIRD_EXCEPTION_MODE_SILENT 0
#define FBIRD_EXCEPTION_MODE_THROW 1
PHP_FUNCTION(fbird_wait_event);
PHP_FUNCTION(fbird_set_event_handler);
PHP_FUNCTION(fbird_poll_event);
PHP_FUNCTION(fbird_free_event_handler);
PHP_FUNCTION(fbird_get_client_version);
PHP_FUNCTION(fbird_get_client_major_version);
PHP_FUNCTION(fbird_get_client_minor_version);
/* Limbo Transaction Functions (Two-Phase Commit Recovery) */
PHP_FUNCTION(fbird_get_limbo_transactions);
PHP_FUNCTION(fbird_reconnect_transaction);
/* IBatch API Functions (Firebird 4.0+ Bulk Operations) */
#if FB_API_VER >= 40
PHP_FUNCTION(fbird_batch_create);
PHP_FUNCTION(fbird_batch_add);
PHP_FUNCTION(fbird_batch_execute);
PHP_FUNCTION(fbird_batch_cancel);
PHP_FUNCTION(fbird_batch_add_blob);
PHP_FUNCTION(fbird_batch_register_blob);
PHP_FUNCTION(fbird_batch_get_blob_alignment);
PHP_FUNCTION(fbird_batch_append_blob_data);
PHP_FUNCTION(fbird_batch_add_blob_stream);
PHP_FUNCTION(fbird_batch_set_default_bpb);
/* Statement/Session Timeout Functions (Firebird 4.0+) */
PHP_FUNCTION(fbird_set_statement_timeout);
PHP_FUNCTION(fbird_get_statement_timeout);
PHP_FUNCTION(fbird_set_idle_timeout);
PHP_FUNCTION(fbird_get_idle_timeout);
/* Per-Statement Timeout Functions (Firebird 4.0+) */
PHP_FUNCTION(fbird_stmt_set_timeout);
PHP_FUNCTION(fbird_stmt_get_timeout);
#endif /* FB_API_VER >= 40 */
#else
#define phpext_firebird_ptr NULL
#endif /* PHP_FIREBIRD_H */
/* M2 Procedural Parity: charset, bind, blob, debug, service (#366-#380, #476-#478) */
PHP_FUNCTION(fbird_set_charset);
PHP_FUNCTION(fbird_character_set_name);
PHP_FUNCTION(fbird_bind_param);
PHP_FUNCTION(fbird_bind_result);
PHP_FUNCTION(fbird_debug);
PHP_FUNCTION(fbird_blob_truncate);
PHP_FUNCTION(fbird_blob_erase);
PHP_FUNCTION(fbird_blob_flush);
PHP_FUNCTION(fbird_send_long_data);
PHP_FUNCTION(fbird_nbak);
PHP_FUNCTION(fbird_trace_start);
PHP_FUNCTION(fbird_trace_stop);
#if FB_API_VER >= 40
PHP_FUNCTION(fbird_set_session_timezone);
PHP_FUNCTION(fbird_get_session_timezone);
#endif
PHP_FUNCTION(fbird_dump_debug_info);
void _php_fbird_error_for_link(ISC_STATUS *status, void *link);
PHP_FUNCTION(fbird_error_list);
PHP_FUNCTION(fbird_error_field);