1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: feabdc10872ef97add839505b6893bad0bb82879 */
3
4 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3___construct, 0, 0, 1)
5 ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
6 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE")
7 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encryptionKey, IS_STRING, 0, "\"\"")
8 ZEND_END_ARG_INFO()
9
10 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_open, 0, 1, IS_VOID, 0)
11 ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
12 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE")
13 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encryptionKey, IS_STRING, 0, "\"\"")
14 ZEND_END_ARG_INFO()
15
16 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_close, 0, 0, 0)
17 ZEND_END_ARG_INFO()
18
19 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_version, 0, 0, IS_ARRAY, 0)
20 ZEND_END_ARG_INFO()
21
22 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_lastInsertRowID, 0, 0, IS_LONG, 0)
23 ZEND_END_ARG_INFO()
24
25 #define arginfo_class_SQLite3_lastErrorCode arginfo_class_SQLite3_lastInsertRowID
26
27 #define arginfo_class_SQLite3_lastExtendedErrorCode arginfo_class_SQLite3_lastInsertRowID
28
29 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_lastErrorMsg, 0, 0, IS_STRING, 0)
30 ZEND_END_ARG_INFO()
31
32 #define arginfo_class_SQLite3_changes arginfo_class_SQLite3_lastInsertRowID
33
34 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_busyTimeout, 0, 1, _IS_BOOL, 0)
35 ZEND_ARG_TYPE_INFO(0, milliseconds, IS_LONG, 0)
36 ZEND_END_ARG_INFO()
37
38 #if !defined(SQLITE_OMIT_LOAD_EXTENSION)
39 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_loadExtension, 0, 1, _IS_BOOL, 0)
40 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
41 ZEND_END_ARG_INFO()
42 #endif
43
44 #if SQLITE_VERSION_NUMBER >= 3006011
45 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_backup, 0, 1, _IS_BOOL, 0)
46 ZEND_ARG_OBJ_INFO(0, destination, SQLite3, 0)
47 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sourceDatabase, IS_STRING, 0, "\"main\"")
48 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, destinationDatabase, IS_STRING, 0, "\"main\"")
49 ZEND_END_ARG_INFO()
50 #endif
51
52 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_escapeString, 0, 1, IS_STRING, 0)
53 ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
54 ZEND_END_ARG_INFO()
55
56 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_SQLite3_prepare, 0, 1, SQLite3Stmt, MAY_BE_FALSE)
57 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
58 ZEND_END_ARG_INFO()
59
60 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_exec, 0, 1, _IS_BOOL, 0)
61 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
62 ZEND_END_ARG_INFO()
63
64 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_SQLite3_query, 0, 1, SQLite3Result, MAY_BE_FALSE)
65 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
66 ZEND_END_ARG_INFO()
67
68 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_querySingle, 0, 1, IS_MIXED, 0)
69 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
70 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, entireRow, _IS_BOOL, 0, "false")
71 ZEND_END_ARG_INFO()
72
73 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_createFunction, 0, 2, _IS_BOOL, 0)
74 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
75 ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
76 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, argCount, IS_LONG, 0, "-1")
77 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
78 ZEND_END_ARG_INFO()
79
80 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_createAggregate, 0, 3, _IS_BOOL, 0)
81 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
82 ZEND_ARG_TYPE_INFO(0, stepCallback, IS_CALLABLE, 0)
83 ZEND_ARG_TYPE_INFO(0, finalCallback, IS_CALLABLE, 0)
84 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, argCount, IS_LONG, 0, "-1")
85 ZEND_END_ARG_INFO()
86
87 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_createCollation, 0, 2, _IS_BOOL, 0)
88 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
89 ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
90 ZEND_END_ARG_INFO()
91
92 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3_openBlob, 0, 0, 3)
93 ZEND_ARG_TYPE_INFO(0, table, IS_STRING, 0)
94 ZEND_ARG_TYPE_INFO(0, column, IS_STRING, 0)
95 ZEND_ARG_TYPE_INFO(0, rowid, IS_LONG, 0)
96 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, database, IS_STRING, 0, "\"main\"")
97 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SQLITE3_OPEN_READONLY")
98 ZEND_END_ARG_INFO()
99
100 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_enableExceptions, 0, 0, _IS_BOOL, 0)
101 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 0, "false")
102 ZEND_END_ARG_INFO()
103
104 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_enableExtendedResultCodes, 0, 0, _IS_BOOL, 0)
105 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 0, "true")
106 ZEND_END_ARG_INFO()
107
108 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3_setAuthorizer, 0, 1, _IS_BOOL, 0)
109 ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1)
110 ZEND_END_ARG_INFO()
111
112 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3Stmt___construct, 0, 0, 2)
113 ZEND_ARG_OBJ_INFO(0, sqlite3, SQLite3, 0)
114 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
115 ZEND_END_ARG_INFO()
116
117 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3Stmt_bindParam, 0, 2, _IS_BOOL, 0)
118 ZEND_ARG_TYPE_MASK(0, param, MAY_BE_STRING|MAY_BE_LONG, NULL)
119 ZEND_ARG_TYPE_INFO(1, var, IS_MIXED, 0)
120 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "SQLITE3_TEXT")
121 ZEND_END_ARG_INFO()
122
123 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3Stmt_bindValue, 0, 2, _IS_BOOL, 0)
124 ZEND_ARG_TYPE_MASK(0, param, MAY_BE_STRING|MAY_BE_LONG, NULL)
125 ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
126 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "SQLITE3_TEXT")
127 ZEND_END_ARG_INFO()
128
129 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SQLite3Stmt_clear, 0, 0, _IS_BOOL, 0)
130 ZEND_END_ARG_INFO()
131
132 #define arginfo_class_SQLite3Stmt_close arginfo_class_SQLite3Stmt_clear
133
134 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_SQLite3Stmt_execute, 0, 0, SQLite3Result, MAY_BE_FALSE)
135 ZEND_END_ARG_INFO()
136
137 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SQLite3Stmt_getSQL, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
138 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expand, _IS_BOOL, 0, "false")
139 ZEND_END_ARG_INFO()
140
141 #define arginfo_class_SQLite3Stmt_paramCount arginfo_class_SQLite3_lastInsertRowID
142
143 #define arginfo_class_SQLite3Stmt_readOnly arginfo_class_SQLite3Stmt_clear
144
145 #define arginfo_class_SQLite3Stmt_reset arginfo_class_SQLite3Stmt_clear
146
147 #define arginfo_class_SQLite3Result___construct arginfo_class_SQLite3_close
148
149 #define arginfo_class_SQLite3Result_numColumns arginfo_class_SQLite3_lastInsertRowID
150
151 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SQLite3Result_columnName, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
152 ZEND_ARG_TYPE_INFO(0, column, IS_LONG, 0)
153 ZEND_END_ARG_INFO()
154
155 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SQLite3Result_columnType, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
156 ZEND_ARG_TYPE_INFO(0, column, IS_LONG, 0)
157 ZEND_END_ARG_INFO()
158
159 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SQLite3Result_fetchArray, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
160 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "SQLITE3_BOTH")
161 ZEND_END_ARG_INFO()
162
163 #define arginfo_class_SQLite3Result_reset arginfo_class_SQLite3Stmt_clear
164
165 #define arginfo_class_SQLite3Result_finalize arginfo_class_SQLite3_close
166
167
168 ZEND_METHOD(SQLite3, open);
169 ZEND_METHOD(SQLite3, close);
170 ZEND_METHOD(SQLite3, version);
171 ZEND_METHOD(SQLite3, lastInsertRowID);
172 ZEND_METHOD(SQLite3, lastErrorCode);
173 ZEND_METHOD(SQLite3, lastExtendedErrorCode);
174 ZEND_METHOD(SQLite3, lastErrorMsg);
175 ZEND_METHOD(SQLite3, changes);
176 ZEND_METHOD(SQLite3, busyTimeout);
177 #if !defined(SQLITE_OMIT_LOAD_EXTENSION)
178 ZEND_METHOD(SQLite3, loadExtension);
179 #endif
180 #if SQLITE_VERSION_NUMBER >= 3006011
181 ZEND_METHOD(SQLite3, backup);
182 #endif
183 ZEND_METHOD(SQLite3, escapeString);
184 ZEND_METHOD(SQLite3, prepare);
185 ZEND_METHOD(SQLite3, exec);
186 ZEND_METHOD(SQLite3, query);
187 ZEND_METHOD(SQLite3, querySingle);
188 ZEND_METHOD(SQLite3, createFunction);
189 ZEND_METHOD(SQLite3, createAggregate);
190 ZEND_METHOD(SQLite3, createCollation);
191 ZEND_METHOD(SQLite3, openBlob);
192 ZEND_METHOD(SQLite3, enableExceptions);
193 ZEND_METHOD(SQLite3, enableExtendedResultCodes);
194 ZEND_METHOD(SQLite3, setAuthorizer);
195 ZEND_METHOD(SQLite3Stmt, __construct);
196 ZEND_METHOD(SQLite3Stmt, bindParam);
197 ZEND_METHOD(SQLite3Stmt, bindValue);
198 ZEND_METHOD(SQLite3Stmt, clear);
199 ZEND_METHOD(SQLite3Stmt, close);
200 ZEND_METHOD(SQLite3Stmt, execute);
201 ZEND_METHOD(SQLite3Stmt, getSQL);
202 ZEND_METHOD(SQLite3Stmt, paramCount);
203 ZEND_METHOD(SQLite3Stmt, readOnly);
204 ZEND_METHOD(SQLite3Stmt, reset);
205 ZEND_METHOD(SQLite3Result, __construct);
206 ZEND_METHOD(SQLite3Result, numColumns);
207 ZEND_METHOD(SQLite3Result, columnName);
208 ZEND_METHOD(SQLite3Result, columnType);
209 ZEND_METHOD(SQLite3Result, fetchArray);
210 ZEND_METHOD(SQLite3Result, reset);
211 ZEND_METHOD(SQLite3Result, finalize);
212
213
214 static const zend_function_entry class_SQLite3Exception_methods[] = {
215 ZEND_FE_END
216 };
217
218
219 static const zend_function_entry class_SQLite3_methods[] = {
220 ZEND_MALIAS(SQLite3, __construct, open, arginfo_class_SQLite3___construct, ZEND_ACC_PUBLIC)
221 ZEND_ME(SQLite3, open, arginfo_class_SQLite3_open, ZEND_ACC_PUBLIC)
222 ZEND_ME(SQLite3, close, arginfo_class_SQLite3_close, ZEND_ACC_PUBLIC)
223 ZEND_ME(SQLite3, version, arginfo_class_SQLite3_version, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
224 ZEND_ME(SQLite3, lastInsertRowID, arginfo_class_SQLite3_lastInsertRowID, ZEND_ACC_PUBLIC)
225 ZEND_ME(SQLite3, lastErrorCode, arginfo_class_SQLite3_lastErrorCode, ZEND_ACC_PUBLIC)
226 ZEND_ME(SQLite3, lastExtendedErrorCode, arginfo_class_SQLite3_lastExtendedErrorCode, ZEND_ACC_PUBLIC)
227 ZEND_ME(SQLite3, lastErrorMsg, arginfo_class_SQLite3_lastErrorMsg, ZEND_ACC_PUBLIC)
228 ZEND_ME(SQLite3, changes, arginfo_class_SQLite3_changes, ZEND_ACC_PUBLIC)
229 ZEND_ME(SQLite3, busyTimeout, arginfo_class_SQLite3_busyTimeout, ZEND_ACC_PUBLIC)
230 #if !defined(SQLITE_OMIT_LOAD_EXTENSION)
231 ZEND_ME(SQLite3, loadExtension, arginfo_class_SQLite3_loadExtension, ZEND_ACC_PUBLIC)
232 #endif
233 #if SQLITE_VERSION_NUMBER >= 3006011
234 ZEND_ME(SQLite3, backup, arginfo_class_SQLite3_backup, ZEND_ACC_PUBLIC)
235 #endif
236 ZEND_ME(SQLite3, escapeString, arginfo_class_SQLite3_escapeString, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
237 ZEND_ME(SQLite3, prepare, arginfo_class_SQLite3_prepare, ZEND_ACC_PUBLIC)
238 ZEND_ME(SQLite3, exec, arginfo_class_SQLite3_exec, ZEND_ACC_PUBLIC)
239 ZEND_ME(SQLite3, query, arginfo_class_SQLite3_query, ZEND_ACC_PUBLIC)
240 ZEND_ME(SQLite3, querySingle, arginfo_class_SQLite3_querySingle, ZEND_ACC_PUBLIC)
241 ZEND_ME(SQLite3, createFunction, arginfo_class_SQLite3_createFunction, ZEND_ACC_PUBLIC)
242 ZEND_ME(SQLite3, createAggregate, arginfo_class_SQLite3_createAggregate, ZEND_ACC_PUBLIC)
243 ZEND_ME(SQLite3, createCollation, arginfo_class_SQLite3_createCollation, ZEND_ACC_PUBLIC)
244 ZEND_ME(SQLite3, openBlob, arginfo_class_SQLite3_openBlob, ZEND_ACC_PUBLIC)
245 ZEND_ME(SQLite3, enableExceptions, arginfo_class_SQLite3_enableExceptions, ZEND_ACC_PUBLIC)
246 ZEND_ME(SQLite3, enableExtendedResultCodes, arginfo_class_SQLite3_enableExtendedResultCodes, ZEND_ACC_PUBLIC)
247 ZEND_ME(SQLite3, setAuthorizer, arginfo_class_SQLite3_setAuthorizer, ZEND_ACC_PUBLIC)
248 ZEND_FE_END
249 };
250
251
252 static const zend_function_entry class_SQLite3Stmt_methods[] = {
253 ZEND_ME(SQLite3Stmt, __construct, arginfo_class_SQLite3Stmt___construct, ZEND_ACC_PRIVATE)
254 ZEND_ME(SQLite3Stmt, bindParam, arginfo_class_SQLite3Stmt_bindParam, ZEND_ACC_PUBLIC)
255 ZEND_ME(SQLite3Stmt, bindValue, arginfo_class_SQLite3Stmt_bindValue, ZEND_ACC_PUBLIC)
256 ZEND_ME(SQLite3Stmt, clear, arginfo_class_SQLite3Stmt_clear, ZEND_ACC_PUBLIC)
257 ZEND_ME(SQLite3Stmt, close, arginfo_class_SQLite3Stmt_close, ZEND_ACC_PUBLIC)
258 ZEND_ME(SQLite3Stmt, execute, arginfo_class_SQLite3Stmt_execute, ZEND_ACC_PUBLIC)
259 ZEND_ME(SQLite3Stmt, getSQL, arginfo_class_SQLite3Stmt_getSQL, ZEND_ACC_PUBLIC)
260 ZEND_ME(SQLite3Stmt, paramCount, arginfo_class_SQLite3Stmt_paramCount, ZEND_ACC_PUBLIC)
261 ZEND_ME(SQLite3Stmt, readOnly, arginfo_class_SQLite3Stmt_readOnly, ZEND_ACC_PUBLIC)
262 ZEND_ME(SQLite3Stmt, reset, arginfo_class_SQLite3Stmt_reset, ZEND_ACC_PUBLIC)
263 ZEND_FE_END
264 };
265
266
267 static const zend_function_entry class_SQLite3Result_methods[] = {
268 ZEND_ME(SQLite3Result, __construct, arginfo_class_SQLite3Result___construct, ZEND_ACC_PRIVATE)
269 ZEND_ME(SQLite3Result, numColumns, arginfo_class_SQLite3Result_numColumns, ZEND_ACC_PUBLIC)
270 ZEND_ME(SQLite3Result, columnName, arginfo_class_SQLite3Result_columnName, ZEND_ACC_PUBLIC)
271 ZEND_ME(SQLite3Result, columnType, arginfo_class_SQLite3Result_columnType, ZEND_ACC_PUBLIC)
272 ZEND_ME(SQLite3Result, fetchArray, arginfo_class_SQLite3Result_fetchArray, ZEND_ACC_PUBLIC)
273 ZEND_ME(SQLite3Result, reset, arginfo_class_SQLite3Result_reset, ZEND_ACC_PUBLIC)
274 ZEND_ME(SQLite3Result, finalize, arginfo_class_SQLite3Result_finalize, ZEND_ACC_PUBLIC)
275 ZEND_FE_END
276 };
277
register_sqlite3_symbols(int module_number)278 static void register_sqlite3_symbols(int module_number)
279 {
280 REGISTER_LONG_CONSTANT("SQLITE3_ASSOC", PHP_SQLITE3_ASSOC, CONST_PERSISTENT);
281 REGISTER_LONG_CONSTANT("SQLITE3_NUM", PHP_SQLITE3_NUM, CONST_PERSISTENT);
282 REGISTER_LONG_CONSTANT("SQLITE3_BOTH", PHP_SQLITE3_BOTH, CONST_PERSISTENT);
283 REGISTER_LONG_CONSTANT("SQLITE3_INTEGER", SQLITE_INTEGER, CONST_PERSISTENT);
284 REGISTER_LONG_CONSTANT("SQLITE3_FLOAT", SQLITE_FLOAT, CONST_PERSISTENT);
285 REGISTER_LONG_CONSTANT("SQLITE3_TEXT", SQLITE3_TEXT, CONST_PERSISTENT);
286 REGISTER_LONG_CONSTANT("SQLITE3_BLOB", SQLITE_BLOB, CONST_PERSISTENT);
287 REGISTER_LONG_CONSTANT("SQLITE3_NULL", SQLITE_NULL, CONST_PERSISTENT);
288 REGISTER_LONG_CONSTANT("SQLITE3_OPEN_READONLY", SQLITE_OPEN_READONLY, CONST_PERSISTENT);
289 REGISTER_LONG_CONSTANT("SQLITE3_OPEN_READWRITE", SQLITE_OPEN_READWRITE, CONST_PERSISTENT);
290 REGISTER_LONG_CONSTANT("SQLITE3_OPEN_CREATE", SQLITE_OPEN_CREATE, CONST_PERSISTENT);
291 #if defined(SQLITE_DETERMINISTIC)
292 REGISTER_LONG_CONSTANT("SQLITE3_DETERMINISTIC", SQLITE_DETERMINISTIC, CONST_PERSISTENT);
293 #endif
294 }
295
register_class_SQLite3Exception(zend_class_entry * class_entry_Exception)296 static zend_class_entry *register_class_SQLite3Exception(zend_class_entry *class_entry_Exception)
297 {
298 zend_class_entry ce, *class_entry;
299
300 INIT_CLASS_ENTRY(ce, "SQLite3Exception", class_SQLite3Exception_methods);
301 class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception);
302 class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
303
304 return class_entry;
305 }
306
register_class_SQLite3(void)307 static zend_class_entry *register_class_SQLite3(void)
308 {
309 zend_class_entry ce, *class_entry;
310
311 INIT_CLASS_ENTRY(ce, "SQLite3", class_SQLite3_methods);
312 class_entry = zend_register_internal_class_ex(&ce, NULL);
313 class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
314
315 zval const_OK_value;
316 ZVAL_LONG(&const_OK_value, SQLITE_OK);
317 zend_string *const_OK_name = zend_string_init_interned("OK", sizeof("OK") - 1, 1);
318 zend_declare_class_constant_ex(class_entry, const_OK_name, &const_OK_value, ZEND_ACC_PUBLIC, NULL);
319 zend_string_release(const_OK_name);
320
321 zval const_DENY_value;
322 ZVAL_LONG(&const_DENY_value, SQLITE_DENY);
323 zend_string *const_DENY_name = zend_string_init_interned("DENY", sizeof("DENY") - 1, 1);
324 zend_declare_class_constant_ex(class_entry, const_DENY_name, &const_DENY_value, ZEND_ACC_PUBLIC, NULL);
325 zend_string_release(const_DENY_name);
326
327 zval const_IGNORE_value;
328 ZVAL_LONG(&const_IGNORE_value, SQLITE_IGNORE);
329 zend_string *const_IGNORE_name = zend_string_init_interned("IGNORE", sizeof("IGNORE") - 1, 1);
330 zend_declare_class_constant_ex(class_entry, const_IGNORE_name, &const_IGNORE_value, ZEND_ACC_PUBLIC, NULL);
331 zend_string_release(const_IGNORE_name);
332
333 zval const_CREATE_INDEX_value;
334 ZVAL_LONG(&const_CREATE_INDEX_value, SQLITE_CREATE_INDEX);
335 zend_string *const_CREATE_INDEX_name = zend_string_init_interned("CREATE_INDEX", sizeof("CREATE_INDEX") - 1, 1);
336 zend_declare_class_constant_ex(class_entry, const_CREATE_INDEX_name, &const_CREATE_INDEX_value, ZEND_ACC_PUBLIC, NULL);
337 zend_string_release(const_CREATE_INDEX_name);
338
339 zval const_CREATE_TABLE_value;
340 ZVAL_LONG(&const_CREATE_TABLE_value, SQLITE_CREATE_TABLE);
341 zend_string *const_CREATE_TABLE_name = zend_string_init_interned("CREATE_TABLE", sizeof("CREATE_TABLE") - 1, 1);
342 zend_declare_class_constant_ex(class_entry, const_CREATE_TABLE_name, &const_CREATE_TABLE_value, ZEND_ACC_PUBLIC, NULL);
343 zend_string_release(const_CREATE_TABLE_name);
344
345 zval const_CREATE_TEMP_INDEX_value;
346 ZVAL_LONG(&const_CREATE_TEMP_INDEX_value, SQLITE_CREATE_TEMP_INDEX);
347 zend_string *const_CREATE_TEMP_INDEX_name = zend_string_init_interned("CREATE_TEMP_INDEX", sizeof("CREATE_TEMP_INDEX") - 1, 1);
348 zend_declare_class_constant_ex(class_entry, const_CREATE_TEMP_INDEX_name, &const_CREATE_TEMP_INDEX_value, ZEND_ACC_PUBLIC, NULL);
349 zend_string_release(const_CREATE_TEMP_INDEX_name);
350
351 zval const_CREATE_TEMP_TABLE_value;
352 ZVAL_LONG(&const_CREATE_TEMP_TABLE_value, SQLITE_CREATE_TEMP_TABLE);
353 zend_string *const_CREATE_TEMP_TABLE_name = zend_string_init_interned("CREATE_TEMP_TABLE", sizeof("CREATE_TEMP_TABLE") - 1, 1);
354 zend_declare_class_constant_ex(class_entry, const_CREATE_TEMP_TABLE_name, &const_CREATE_TEMP_TABLE_value, ZEND_ACC_PUBLIC, NULL);
355 zend_string_release(const_CREATE_TEMP_TABLE_name);
356
357 zval const_CREATE_TEMP_TRIGGER_value;
358 ZVAL_LONG(&const_CREATE_TEMP_TRIGGER_value, SQLITE_CREATE_TEMP_TRIGGER);
359 zend_string *const_CREATE_TEMP_TRIGGER_name = zend_string_init_interned("CREATE_TEMP_TRIGGER", sizeof("CREATE_TEMP_TRIGGER") - 1, 1);
360 zend_declare_class_constant_ex(class_entry, const_CREATE_TEMP_TRIGGER_name, &const_CREATE_TEMP_TRIGGER_value, ZEND_ACC_PUBLIC, NULL);
361 zend_string_release(const_CREATE_TEMP_TRIGGER_name);
362
363 zval const_CREATE_TEMP_VIEW_value;
364 ZVAL_LONG(&const_CREATE_TEMP_VIEW_value, SQLITE_CREATE_TEMP_VIEW);
365 zend_string *const_CREATE_TEMP_VIEW_name = zend_string_init_interned("CREATE_TEMP_VIEW", sizeof("CREATE_TEMP_VIEW") - 1, 1);
366 zend_declare_class_constant_ex(class_entry, const_CREATE_TEMP_VIEW_name, &const_CREATE_TEMP_VIEW_value, ZEND_ACC_PUBLIC, NULL);
367 zend_string_release(const_CREATE_TEMP_VIEW_name);
368
369 zval const_CREATE_TRIGGER_value;
370 ZVAL_LONG(&const_CREATE_TRIGGER_value, SQLITE_CREATE_TRIGGER);
371 zend_string *const_CREATE_TRIGGER_name = zend_string_init_interned("CREATE_TRIGGER", sizeof("CREATE_TRIGGER") - 1, 1);
372 zend_declare_class_constant_ex(class_entry, const_CREATE_TRIGGER_name, &const_CREATE_TRIGGER_value, ZEND_ACC_PUBLIC, NULL);
373 zend_string_release(const_CREATE_TRIGGER_name);
374
375 zval const_CREATE_VIEW_value;
376 ZVAL_LONG(&const_CREATE_VIEW_value, SQLITE_CREATE_VIEW);
377 zend_string *const_CREATE_VIEW_name = zend_string_init_interned("CREATE_VIEW", sizeof("CREATE_VIEW") - 1, 1);
378 zend_declare_class_constant_ex(class_entry, const_CREATE_VIEW_name, &const_CREATE_VIEW_value, ZEND_ACC_PUBLIC, NULL);
379 zend_string_release(const_CREATE_VIEW_name);
380
381 zval const_DELETE_value;
382 ZVAL_LONG(&const_DELETE_value, SQLITE_DELETE);
383 zend_string *const_DELETE_name = zend_string_init_interned("DELETE", sizeof("DELETE") - 1, 1);
384 zend_declare_class_constant_ex(class_entry, const_DELETE_name, &const_DELETE_value, ZEND_ACC_PUBLIC, NULL);
385 zend_string_release(const_DELETE_name);
386
387 zval const_DROP_INDEX_value;
388 ZVAL_LONG(&const_DROP_INDEX_value, SQLITE_DROP_INDEX);
389 zend_string *const_DROP_INDEX_name = zend_string_init_interned("DROP_INDEX", sizeof("DROP_INDEX") - 1, 1);
390 zend_declare_class_constant_ex(class_entry, const_DROP_INDEX_name, &const_DROP_INDEX_value, ZEND_ACC_PUBLIC, NULL);
391 zend_string_release(const_DROP_INDEX_name);
392
393 zval const_DROP_TABLE_value;
394 ZVAL_LONG(&const_DROP_TABLE_value, SQLITE_DROP_TABLE);
395 zend_string *const_DROP_TABLE_name = zend_string_init_interned("DROP_TABLE", sizeof("DROP_TABLE") - 1, 1);
396 zend_declare_class_constant_ex(class_entry, const_DROP_TABLE_name, &const_DROP_TABLE_value, ZEND_ACC_PUBLIC, NULL);
397 zend_string_release(const_DROP_TABLE_name);
398
399 zval const_DROP_TEMP_INDEX_value;
400 ZVAL_LONG(&const_DROP_TEMP_INDEX_value, SQLITE_DROP_TEMP_INDEX);
401 zend_string *const_DROP_TEMP_INDEX_name = zend_string_init_interned("DROP_TEMP_INDEX", sizeof("DROP_TEMP_INDEX") - 1, 1);
402 zend_declare_class_constant_ex(class_entry, const_DROP_TEMP_INDEX_name, &const_DROP_TEMP_INDEX_value, ZEND_ACC_PUBLIC, NULL);
403 zend_string_release(const_DROP_TEMP_INDEX_name);
404
405 zval const_DROP_TEMP_TABLE_value;
406 ZVAL_LONG(&const_DROP_TEMP_TABLE_value, SQLITE_DROP_TEMP_TABLE);
407 zend_string *const_DROP_TEMP_TABLE_name = zend_string_init_interned("DROP_TEMP_TABLE", sizeof("DROP_TEMP_TABLE") - 1, 1);
408 zend_declare_class_constant_ex(class_entry, const_DROP_TEMP_TABLE_name, &const_DROP_TEMP_TABLE_value, ZEND_ACC_PUBLIC, NULL);
409 zend_string_release(const_DROP_TEMP_TABLE_name);
410
411 zval const_DROP_TEMP_TRIGGER_value;
412 ZVAL_LONG(&const_DROP_TEMP_TRIGGER_value, SQLITE_DROP_TEMP_TRIGGER);
413 zend_string *const_DROP_TEMP_TRIGGER_name = zend_string_init_interned("DROP_TEMP_TRIGGER", sizeof("DROP_TEMP_TRIGGER") - 1, 1);
414 zend_declare_class_constant_ex(class_entry, const_DROP_TEMP_TRIGGER_name, &const_DROP_TEMP_TRIGGER_value, ZEND_ACC_PUBLIC, NULL);
415 zend_string_release(const_DROP_TEMP_TRIGGER_name);
416
417 zval const_DROP_TEMP_VIEW_value;
418 ZVAL_LONG(&const_DROP_TEMP_VIEW_value, SQLITE_DROP_TEMP_VIEW);
419 zend_string *const_DROP_TEMP_VIEW_name = zend_string_init_interned("DROP_TEMP_VIEW", sizeof("DROP_TEMP_VIEW") - 1, 1);
420 zend_declare_class_constant_ex(class_entry, const_DROP_TEMP_VIEW_name, &const_DROP_TEMP_VIEW_value, ZEND_ACC_PUBLIC, NULL);
421 zend_string_release(const_DROP_TEMP_VIEW_name);
422
423 zval const_DROP_TRIGGER_value;
424 ZVAL_LONG(&const_DROP_TRIGGER_value, SQLITE_DROP_TRIGGER);
425 zend_string *const_DROP_TRIGGER_name = zend_string_init_interned("DROP_TRIGGER", sizeof("DROP_TRIGGER") - 1, 1);
426 zend_declare_class_constant_ex(class_entry, const_DROP_TRIGGER_name, &const_DROP_TRIGGER_value, ZEND_ACC_PUBLIC, NULL);
427 zend_string_release(const_DROP_TRIGGER_name);
428
429 zval const_DROP_VIEW_value;
430 ZVAL_LONG(&const_DROP_VIEW_value, SQLITE_DROP_VIEW);
431 zend_string *const_DROP_VIEW_name = zend_string_init_interned("DROP_VIEW", sizeof("DROP_VIEW") - 1, 1);
432 zend_declare_class_constant_ex(class_entry, const_DROP_VIEW_name, &const_DROP_VIEW_value, ZEND_ACC_PUBLIC, NULL);
433 zend_string_release(const_DROP_VIEW_name);
434
435 zval const_INSERT_value;
436 ZVAL_LONG(&const_INSERT_value, SQLITE_INSERT);
437 zend_string *const_INSERT_name = zend_string_init_interned("INSERT", sizeof("INSERT") - 1, 1);
438 zend_declare_class_constant_ex(class_entry, const_INSERT_name, &const_INSERT_value, ZEND_ACC_PUBLIC, NULL);
439 zend_string_release(const_INSERT_name);
440
441 zval const_PRAGMA_value;
442 ZVAL_LONG(&const_PRAGMA_value, SQLITE_PRAGMA);
443 zend_string *const_PRAGMA_name = zend_string_init_interned("PRAGMA", sizeof("PRAGMA") - 1, 1);
444 zend_declare_class_constant_ex(class_entry, const_PRAGMA_name, &const_PRAGMA_value, ZEND_ACC_PUBLIC, NULL);
445 zend_string_release(const_PRAGMA_name);
446
447 zval const_READ_value;
448 ZVAL_LONG(&const_READ_value, SQLITE_READ);
449 zend_string *const_READ_name = zend_string_init_interned("READ", sizeof("READ") - 1, 1);
450 zend_declare_class_constant_ex(class_entry, const_READ_name, &const_READ_value, ZEND_ACC_PUBLIC, NULL);
451 zend_string_release(const_READ_name);
452
453 zval const_SELECT_value;
454 ZVAL_LONG(&const_SELECT_value, SQLITE_SELECT);
455 zend_string *const_SELECT_name = zend_string_init_interned("SELECT", sizeof("SELECT") - 1, 1);
456 zend_declare_class_constant_ex(class_entry, const_SELECT_name, &const_SELECT_value, ZEND_ACC_PUBLIC, NULL);
457 zend_string_release(const_SELECT_name);
458
459 zval const_TRANSACTION_value;
460 ZVAL_LONG(&const_TRANSACTION_value, SQLITE_TRANSACTION);
461 zend_string *const_TRANSACTION_name = zend_string_init_interned("TRANSACTION", sizeof("TRANSACTION") - 1, 1);
462 zend_declare_class_constant_ex(class_entry, const_TRANSACTION_name, &const_TRANSACTION_value, ZEND_ACC_PUBLIC, NULL);
463 zend_string_release(const_TRANSACTION_name);
464
465 zval const_UPDATE_value;
466 ZVAL_LONG(&const_UPDATE_value, SQLITE_UPDATE);
467 zend_string *const_UPDATE_name = zend_string_init_interned("UPDATE", sizeof("UPDATE") - 1, 1);
468 zend_declare_class_constant_ex(class_entry, const_UPDATE_name, &const_UPDATE_value, ZEND_ACC_PUBLIC, NULL);
469 zend_string_release(const_UPDATE_name);
470
471 zval const_ATTACH_value;
472 ZVAL_LONG(&const_ATTACH_value, SQLITE_ATTACH);
473 zend_string *const_ATTACH_name = zend_string_init_interned("ATTACH", sizeof("ATTACH") - 1, 1);
474 zend_declare_class_constant_ex(class_entry, const_ATTACH_name, &const_ATTACH_value, ZEND_ACC_PUBLIC, NULL);
475 zend_string_release(const_ATTACH_name);
476
477 zval const_DETACH_value;
478 ZVAL_LONG(&const_DETACH_value, SQLITE_DETACH);
479 zend_string *const_DETACH_name = zend_string_init_interned("DETACH", sizeof("DETACH") - 1, 1);
480 zend_declare_class_constant_ex(class_entry, const_DETACH_name, &const_DETACH_value, ZEND_ACC_PUBLIC, NULL);
481 zend_string_release(const_DETACH_name);
482
483 zval const_ALTER_TABLE_value;
484 ZVAL_LONG(&const_ALTER_TABLE_value, SQLITE_ALTER_TABLE);
485 zend_string *const_ALTER_TABLE_name = zend_string_init_interned("ALTER_TABLE", sizeof("ALTER_TABLE") - 1, 1);
486 zend_declare_class_constant_ex(class_entry, const_ALTER_TABLE_name, &const_ALTER_TABLE_value, ZEND_ACC_PUBLIC, NULL);
487 zend_string_release(const_ALTER_TABLE_name);
488
489 zval const_REINDEX_value;
490 ZVAL_LONG(&const_REINDEX_value, SQLITE_REINDEX);
491 zend_string *const_REINDEX_name = zend_string_init_interned("REINDEX", sizeof("REINDEX") - 1, 1);
492 zend_declare_class_constant_ex(class_entry, const_REINDEX_name, &const_REINDEX_value, ZEND_ACC_PUBLIC, NULL);
493 zend_string_release(const_REINDEX_name);
494
495 zval const_ANALYZE_value;
496 ZVAL_LONG(&const_ANALYZE_value, SQLITE_ANALYZE);
497 zend_string *const_ANALYZE_name = zend_string_init_interned("ANALYZE", sizeof("ANALYZE") - 1, 1);
498 zend_declare_class_constant_ex(class_entry, const_ANALYZE_name, &const_ANALYZE_value, ZEND_ACC_PUBLIC, NULL);
499 zend_string_release(const_ANALYZE_name);
500
501 zval const_CREATE_VTABLE_value;
502 ZVAL_LONG(&const_CREATE_VTABLE_value, SQLITE_CREATE_VTABLE);
503 zend_string *const_CREATE_VTABLE_name = zend_string_init_interned("CREATE_VTABLE", sizeof("CREATE_VTABLE") - 1, 1);
504 zend_declare_class_constant_ex(class_entry, const_CREATE_VTABLE_name, &const_CREATE_VTABLE_value, ZEND_ACC_PUBLIC, NULL);
505 zend_string_release(const_CREATE_VTABLE_name);
506
507 zval const_DROP_VTABLE_value;
508 ZVAL_LONG(&const_DROP_VTABLE_value, SQLITE_DROP_VTABLE);
509 zend_string *const_DROP_VTABLE_name = zend_string_init_interned("DROP_VTABLE", sizeof("DROP_VTABLE") - 1, 1);
510 zend_declare_class_constant_ex(class_entry, const_DROP_VTABLE_name, &const_DROP_VTABLE_value, ZEND_ACC_PUBLIC, NULL);
511 zend_string_release(const_DROP_VTABLE_name);
512
513 zval const_FUNCTION_value;
514 ZVAL_LONG(&const_FUNCTION_value, SQLITE_FUNCTION);
515 zend_string *const_FUNCTION_name = zend_string_init_interned("FUNCTION", sizeof("FUNCTION") - 1, 1);
516 zend_declare_class_constant_ex(class_entry, const_FUNCTION_name, &const_FUNCTION_value, ZEND_ACC_PUBLIC, NULL);
517 zend_string_release(const_FUNCTION_name);
518
519 zval const_SAVEPOINT_value;
520 ZVAL_LONG(&const_SAVEPOINT_value, SQLITE_SAVEPOINT);
521 zend_string *const_SAVEPOINT_name = zend_string_init_interned("SAVEPOINT", sizeof("SAVEPOINT") - 1, 1);
522 zend_declare_class_constant_ex(class_entry, const_SAVEPOINT_name, &const_SAVEPOINT_value, ZEND_ACC_PUBLIC, NULL);
523 zend_string_release(const_SAVEPOINT_name);
524
525 zval const_COPY_value;
526 ZVAL_LONG(&const_COPY_value, SQLITE_COPY);
527 zend_string *const_COPY_name = zend_string_init_interned("COPY", sizeof("COPY") - 1, 1);
528 zend_declare_class_constant_ex(class_entry, const_COPY_name, &const_COPY_value, ZEND_ACC_PUBLIC, NULL);
529 zend_string_release(const_COPY_name);
530 #if defined(SQLITE_RECURSIVE)
531
532 zval const_RECURSIVE_value;
533 ZVAL_LONG(&const_RECURSIVE_value, SQLITE_RECURSIVE);
534 zend_string *const_RECURSIVE_name = zend_string_init_interned("RECURSIVE", sizeof("RECURSIVE") - 1, 1);
535 zend_declare_class_constant_ex(class_entry, const_RECURSIVE_name, &const_RECURSIVE_value, ZEND_ACC_PUBLIC, NULL);
536 zend_string_release(const_RECURSIVE_name);
537 #endif
538
539 return class_entry;
540 }
541
register_class_SQLite3Stmt(void)542 static zend_class_entry *register_class_SQLite3Stmt(void)
543 {
544 zend_class_entry ce, *class_entry;
545
546 INIT_CLASS_ENTRY(ce, "SQLite3Stmt", class_SQLite3Stmt_methods);
547 class_entry = zend_register_internal_class_ex(&ce, NULL);
548 class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
549
550 return class_entry;
551 }
552
register_class_SQLite3Result(void)553 static zend_class_entry *register_class_SQLite3Result(void)
554 {
555 zend_class_entry ce, *class_entry;
556
557 INIT_CLASS_ENTRY(ce, "SQLite3Result", class_SQLite3Result_methods);
558 class_entry = zend_register_internal_class_ex(&ce, NULL);
559 class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
560
561 return class_entry;
562 }
563