FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
php-src/ext/sqlite3/php_sqlite3_structs.h at master · php/php-src · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
php
/
php-src
Public
Notifications
You must be signed in to change notification settings
Fork
8.1k
Star
40.3k
Code
Issues
963
Pull requests
1k
Actions
Security and quality
52
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
php-src
/
ext
/
sqlite3
/
php_sqlite3_structs.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
122 lines (93 loc) · 3.44 KB
Breadcrumbs
php-src
/
ext
/
sqlite3
/
php_sqlite3_structs.h
Copy path
File metadata and controls
122 lines (93 loc) · 3.44 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
/*
+----------------------------------------------------------------------+
| Copyright © The PHP Group and Contributors. |
+----------------------------------------------------------------------+
| This source file is subject to the Modified BSD License that is |
| bundled with this package in the file LICENSE, and is available |
| through the World Wide Web at <https://www.php.net/license/>. |
| |
| SPDX-License-Identifier: BSD-3-Clause |
+----------------------------------------------------------------------+
| Authors: Scott MacVicar <scottmac@php.net> |
+----------------------------------------------------------------------+
*/
#ifndef
PHP_SQLITE_STRUCTS_H
#define
PHP_SQLITE_STRUCTS_H
#include
<sqlite3.h>
/* for backwards compatibility reasons */
#ifndef
SQLITE_OPEN_READONLY
#define
SQLITE_OPEN_READONLY
0x00000001
#endif
#ifndef
SQLITE_OPEN_READWRITE
#define
SQLITE_OPEN_READWRITE
0x00000002
#endif
#ifndef
SQLITE_OPEN_CREATE
#define
SQLITE_OPEN_CREATE
0x00000004
#endif
/* Structure for SQLite Statement Parameter. */
struct
php_sqlite3_bound_param
{
zend_long
param_number
;
zend_string
*
name
;
zend_long
type
;
zval
parameter
;
};
/* Structure for SQLite function. */
typedef
struct
_php_sqlite3_func
{
struct
_php_sqlite3_func
*
next
;
zend_string
*
func_name
;
int
argc
;
zend_fcall_info_cache
func
;
zend_fcall_info_cache
step
;
zend_fcall_info_cache
fini
;
}
php_sqlite3_func
;
/* Structure for SQLite collation function */
typedef
struct
_php_sqlite3_collation
{
struct
_php_sqlite3_collation
*
next
;
zend_string
*
collation_name
;
zend_fcall_info_cache
cmp_func
;
}
php_sqlite3_collation
;
/* Structure for SQLite Database object. */
typedef
struct
_php_sqlite3_db_object
{
bool
initialised
;
bool
exception
;
sqlite3
*
db
;
php_sqlite3_func
*
funcs
;
php_sqlite3_collation
*
collations
;
zend_fcall_info_cache
authorizer_fcc
;
zend_llist
free_list
;
zend_object
zo
;
}
php_sqlite3_db_object
;
#define
php_sqlite3_db_from_obj
(
obj
) ZEND_CONTAINER_OF(obj, php_sqlite3_db_object, zo)
#define
Z_SQLITE3_DB_P
(
zv
) php_sqlite3_db_from_obj(Z_OBJ_P((zv)))
/* Structure for SQLite Database object. */
typedef
struct
_php_sqlite3_agg_context
{
zval
zval_context
;
zend_long
row_count
;
}
php_sqlite3_agg_context
;
typedef
struct
_php_sqlite3_stmt_object
php_sqlite3_stmt
;
typedef
struct
_php_sqlite3_result_object
php_sqlite3_result
;
/* Structure for SQLite Result object. */
struct
_php_sqlite3_result_object
{
php_sqlite3_db_object
*
db_obj
;
php_sqlite3_stmt
*
stmt_obj
;
bool
is_prepared_statement
;
/* Cache of column names to speed up repeated fetchArray(SQLITE3_ASSOC) calls.
* Cache is cleared on reset() and finalize() calls. */
int
column_count
;
zend_string
*
*
column_names
;
zend_object
zo
;
};
#define
php_sqlite3_result_from_obj
(
obj
) ZEND_CONTAINER_OF(obj, php_sqlite3_result, zo)
#define
Z_SQLITE3_RESULT_P
(
zv
) php_sqlite3_result_from_obj(Z_OBJ_P((zv)))
/* Structure for SQLite Statement object. */
struct
_php_sqlite3_stmt_object
{
sqlite3_stmt
*
stmt
;
php_sqlite3_db_object
*
db_obj
;
bool
initialised
;
/* Keep track of the zvals for bound parameters */
HashTable
*
bound_params
;
zend_object
zo
;
};
#define
php_sqlite3_stmt_from_obj
(
obj
) ZEND_CONTAINER_OF(obj, php_sqlite3_stmt, zo)
#define
Z_SQLITE3_STMT_P
(
zv
) php_sqlite3_stmt_from_obj(Z_OBJ_P((zv)))
#endif
Back
|
FazBrowse Home
|
New Git URL