php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_sqlite3_structs.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Authors: Scott MacVicar <scottmac@php.net> |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef PHP_SQLITE_STRUCTS_H
18#define PHP_SQLITE_STRUCTS_H
19
20#include <sqlite3.h>
21
22/* for backwards compatibility reasons */
23#ifndef SQLITE_OPEN_READONLY
24#define SQLITE_OPEN_READONLY 0x00000001
25#endif
26
27#ifndef SQLITE_OPEN_READWRITE
28#define SQLITE_OPEN_READWRITE 0x00000002
29#endif
30
31#ifndef SQLITE_OPEN_CREATE
32#define SQLITE_OPEN_CREATE 0x00000004
33#endif
34
35/* Structure for SQLite Statement Parameter. */
42
43/* Structure for SQLite function. */
54
55/* Structure for SQLite collation function */
62
63/* Structure for SQLite Database object. */
76
77static inline php_sqlite3_db_object *php_sqlite3_db_from_obj(zend_object *obj) {
78 return (php_sqlite3_db_object*)((char*)(obj) - XtOffsetOf(php_sqlite3_db_object, zo));
79}
80
81#define Z_SQLITE3_DB_P(zv) php_sqlite3_db_from_obj(Z_OBJ_P((zv)))
82
83/* Structure for SQLite Database object. */
88
91
92/* sqlite3 objects to be destroyed */
97
98/* Structure for SQLite Result object. */
103
104 /* Cache of column names to speed up repeated fetchArray(SQLITE3_ASSOC) calls.
105 * Cache is cleared on reset() and finalize() calls. */
108
111};
112
113static inline php_sqlite3_result *php_sqlite3_result_from_obj(zend_object *obj) {
114 return (php_sqlite3_result*)((char*)(obj) - XtOffsetOf(php_sqlite3_result, zo));
115}
116
117#define Z_SQLITE3_RESULT_P(zv) php_sqlite3_result_from_obj(Z_OBJ_P((zv)))
118
119/* Structure for SQLite Statement object. */
121 sqlite3_stmt *stmt;
124
126
127 /* Keep track of the zvals for bound parameters */
130};
131
132static inline php_sqlite3_stmt *php_sqlite3_stmt_from_obj(zend_object *obj) {
133 return (php_sqlite3_stmt*)((char*)(obj) - XtOffsetOf(php_sqlite3_stmt, zo));
134}
135
136#define Z_SQLITE3_STMT_P(zv) php_sqlite3_stmt_from_obj(Z_OBJ_P((zv)))
137
138#endif
struct _php_sqlite3_free_list php_sqlite3_free_list
struct _php_sqlite3_stmt_object php_sqlite3_stmt
struct _php_sqlite3_collation php_sqlite3_collation
struct _php_sqlite3_result_object php_sqlite3_result
struct _php_sqlite3_db_object php_sqlite3_db_object
struct _php_sqlite3_agg_context php_sqlite3_agg_context
struct _php_sqlite3_func php_sqlite3_func
zend_fcall_info_cache cmp_func
struct _php_sqlite3_collation * next
php_sqlite3_collation * collations
zend_fcall_info_cache authorizer_fcc
php_sqlite3_stmt * stmt_obj
zend_fcall_info_cache fini
zend_fcall_info_cache step
zend_fcall_info_cache func
struct _php_sqlite3_func * next
php_sqlite3_db_object * db_obj
php_sqlite3_db_object * db_obj
struct _zend_fcall_info_cache zend_fcall_info_cache
struct _zval_struct zval
struct _zend_llist zend_llist
int32_t zend_long
Definition zend_long.h:42
struct _zend_string zend_string
#define XtOffsetOf(s_type, field)
struct _zend_object zend_object
struct _zend_array HashTable
Definition zend_types.h:386