Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / php / ext / sqlite3 / php_sqlite3_structs.h
blob0e813b6dfdc87044cfd0af153253ad2641e07c6f
1 /*
2 +----------------------------------------------------------------------+
3 | PHP Version 5 |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 1997-2013 The PHP Group |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
15 | Authors: Scott MacVicar <scottmac@php.net> |
16 +----------------------------------------------------------------------+
19 /* $Id$ */
21 #ifndef PHP_SQLITE_STRUCTS_H
22 #define PHP_SQLITE_STRUCTS_H
24 #include <sqlite3.h>
26 /* for backwards compatability reasons */
27 #ifndef SQLITE_OPEN_READONLY
28 #define SQLITE_OPEN_READONLY 0x00000001
29 #endif
31 #ifndef SQLITE_OPEN_READWRITE
32 #define SQLITE_OPEN_READWRITE 0x00000002
33 #endif
35 #ifndef SQLITE_OPEN_CREATE
36 #define SQLITE_OPEN_CREATE 0x00000004
37 #endif
39 /* Structure for SQLite Statement Parameter. */
40 struct php_sqlite3_bound_param {
41 long param_number;
42 char *name;
43 int name_len;
44 long type;
46 zval *parameter;
49 struct php_sqlite3_fci {
50 zend_fcall_info fci;
51 zend_fcall_info_cache fcc;
54 /* Structure for SQLite function. */
55 typedef struct _php_sqlite3_func {
56 struct _php_sqlite3_func *next;
58 const char *func_name;
59 int argc;
61 zval *func, *step, *fini;
62 struct php_sqlite3_fci afunc, astep, afini;
63 } php_sqlite3_func;
65 /* Structure for SQLite collation function */
66 typedef struct _php_sqlite3_collation {
67 struct _php_sqlite3_collation *next;
69 const char *collation_name;
70 zval *cmp_func;
71 struct php_sqlite3_fci fci;
72 } php_sqlite3_collation;
74 /* Structure for SQLite Database object. */
75 typedef struct _php_sqlite3_db_object {
76 zend_object zo;
77 int initialised;
78 sqlite3 *db;
79 php_sqlite3_func *funcs;
80 php_sqlite3_collation *collations;
82 zend_bool exception;
84 zend_llist free_list;
85 } php_sqlite3_db_object;
87 /* Structure for SQLite Database object. */
88 typedef struct _php_sqlite3_agg_context {
89 zval *zval_context;
90 long row_count;
91 } php_sqlite3_agg_context;
93 typedef struct _php_sqlite3_stmt_object php_sqlite3_stmt;
94 typedef struct _php_sqlite3_result_object php_sqlite3_result;
96 /* sqlite3 objects to be destroyed */
97 typedef struct _php_sqlite3_free_list {
98 zval *stmt_obj_zval;
99 php_sqlite3_stmt *stmt_obj;
100 } php_sqlite3_free_list;
102 /* Structure for SQLite Result object. */
103 struct _php_sqlite3_result_object {
104 zend_object zo;
105 php_sqlite3_db_object *db_obj;
106 php_sqlite3_stmt *stmt_obj;
107 zval *stmt_obj_zval;
109 int is_prepared_statement;
110 int complete;
113 /* Structure for SQLite Statement object. */
114 struct _php_sqlite3_stmt_object {
115 zend_object zo;
116 sqlite3_stmt *stmt;
117 php_sqlite3_db_object *db_obj;
118 zval *db_obj_zval;
120 int initialised;
122 /* Keep track of the zvals for bound parameters */
123 HashTable *bound_params;
126 #endif
130 * Local variables:
131 * tab-width: 4
132 * c-basic-offset: 4
133 * indent-tabs-mode: t
134 * End: