Annotation of embedaddon/php/ext/sqlite3/php_sqlite3_structs.h, revision 1.1

1.1     ! misho       1: /*
        !             2:    +----------------------------------------------------------------------+
        !             3:    | PHP Version 5                                                        |
        !             4:    +----------------------------------------------------------------------+
        !             5:    | Copyright (c) 1997-2012 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:    +----------------------------------------------------------------------+
        !            17: */
        !            18: 
        !            19: /* $Id: php_sqlite3_structs.h 321634 2012-01-01 13:15:04Z felipe $ */
        !            20: 
        !            21: #ifndef PHP_SQLITE_STRUCTS_H
        !            22: #define PHP_SQLITE_STRUCTS_H
        !            23: 
        !            24: #include <sqlite3.h>
        !            25: 
        !            26: /* for backwards compatability reasons */
        !            27: #ifndef SQLITE_OPEN_READONLY
        !            28: #define SQLITE_OPEN_READONLY 0x00000001
        !            29: #endif
        !            30: 
        !            31: #ifndef SQLITE_OPEN_READWRITE
        !            32: #define SQLITE_OPEN_READWRITE 0x00000002
        !            33: #endif
        !            34: 
        !            35: #ifndef SQLITE_OPEN_CREATE
        !            36: #define SQLITE_OPEN_CREATE 0x00000004
        !            37: #endif
        !            38: 
        !            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;
        !            45: 
        !            46:        zval *parameter;
        !            47: };
        !            48: 
        !            49: struct php_sqlite3_fci {
        !            50:        zend_fcall_info fci;
        !            51:        zend_fcall_info_cache fcc;
        !            52: };
        !            53: 
        !            54: /* Structure for SQLite function. */
        !            55: typedef struct _php_sqlite3_func {
        !            56:        struct _php_sqlite3_func *next;
        !            57: 
        !            58:        const char *func_name;
        !            59:        int argc;
        !            60: 
        !            61:        zval *func, *step, *fini;
        !            62:        struct php_sqlite3_fci afunc, astep, afini;
        !            63: } php_sqlite3_func;
        !            64: 
        !            65: /* Structure for SQLite Database object. */
        !            66: typedef struct _php_sqlite3_db_object  {
        !            67:        zend_object zo;
        !            68:        int initialised;
        !            69:        sqlite3 *db;
        !            70:        php_sqlite3_func *funcs;
        !            71:        zend_bool exception;
        !            72: 
        !            73:        zend_llist free_list;
        !            74: } php_sqlite3_db_object;
        !            75: 
        !            76: /* Structure for SQLite Database object. */
        !            77: typedef struct _php_sqlite3_agg_context  {
        !            78:        zval *zval_context;
        !            79:        long row_count;
        !            80: } php_sqlite3_agg_context;
        !            81: 
        !            82: typedef struct _php_sqlite3_stmt_object php_sqlite3_stmt;
        !            83: typedef struct _php_sqlite3_result_object php_sqlite3_result;
        !            84: 
        !            85: /* sqlite3 objects to be destroyed */
        !            86: typedef struct _php_sqlite3_free_list {
        !            87:        zval *stmt_obj_zval;
        !            88:        php_sqlite3_stmt *stmt_obj;
        !            89: } php_sqlite3_free_list;
        !            90: 
        !            91: /* Structure for SQLite Result object. */
        !            92: struct _php_sqlite3_result_object  {
        !            93:        zend_object zo;
        !            94:        php_sqlite3_db_object *db_obj;
        !            95:        php_sqlite3_stmt *stmt_obj;
        !            96:        zval *stmt_obj_zval;
        !            97:        
        !            98:        int is_prepared_statement;
        !            99:        int complete;
        !           100: };
        !           101: 
        !           102: /* Structure for SQLite Statement object. */
        !           103: struct _php_sqlite3_stmt_object  {
        !           104:        zend_object zo;
        !           105:        sqlite3_stmt *stmt;
        !           106:        php_sqlite3_db_object *db_obj;
        !           107:        zval *db_obj_zval;
        !           108: 
        !           109:        int initialised;
        !           110: 
        !           111:        /* Keep track of the zvals for bound parameters */
        !           112:        HashTable *bound_params;
        !           113: };
        !           114: 
        !           115: #endif
        !           116: 
        !           117: 
        !           118: /*
        !           119:  * Local variables:
        !           120:  * tab-width: 4
        !           121:  * c-basic-offset: 4
        !           122:  * indent-tabs-mode: t
        !           123:  * End:
        !           124:  */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>