- Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathphp_pdo_sqlite_int.h
84 lines (66 loc) · 2.66 KB
/
php_pdo_sqlite_int.h
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
/*
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| https://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Wez Furlong <wez@php.net> |
+----------------------------------------------------------------------+
*/
#ifndefPHP_PDO_SQLITE_INT_H
#definePHP_PDO_SQLITE_INT_H
#include<sqlite3.h>
typedefstruct {
constchar*file;
intline;
unsigned interrcode;
char*errmsg;
} pdo_sqlite_error_info;
structpdo_sqlite_func {
structpdo_sqlite_func*next;
intargc;
constchar*funcname;
/* accelerated callback references */
zend_fcall_info_cachefunc;
zend_fcall_info_cachestep;
zend_fcall_info_cachefini;
};
structpdo_sqlite_collation {
structpdo_sqlite_collation*next;
constchar*name;
zend_fcall_info_cachecallback;
};
typedefstruct {
sqlite3*db;
pdo_sqlite_error_infoeinfo;
structpdo_sqlite_func*funcs;
structpdo_sqlite_collation*collations;
} pdo_sqlite_db_handle;
typedefstruct {
pdo_sqlite_db_handle*H;
sqlite3_stmt*stmt;
unsignedpre_fetched:1;
unsigneddone:1;
} pdo_sqlite_stmt;
externconstpdo_driver_tpdo_sqlite_driver;
externintpdo_sqlite_scanner(pdo_scanner_t*s);
externint_pdo_sqlite_error(pdo_dbh_t*dbh, pdo_stmt_t*stmt, constchar*file, intline);
#definepdo_sqlite_error(s) _pdo_sqlite_error(s, NULL, __FILE__, __LINE__)
#definepdo_sqlite_error_stmt(s) _pdo_sqlite_error(stmt->dbh, stmt, __FILE__, __LINE__)
externconststructpdo_stmt_methodssqlite_stmt_methods;
enum {
PDO_SQLITE_ATTR_OPEN_FLAGS=PDO_ATTR_DRIVER_SPECIFIC,
PDO_SQLITE_ATTR_READONLY_STATEMENT,
PDO_SQLITE_ATTR_EXTENDED_RESULT_CODES
};
typedefintpdo_sqlite_create_collation_callback(void*, int, constvoid*, int, constvoid*);
voidpdo_sqlite_create_function_internal(INTERNAL_FUNCTION_PARAMETERS);
voidpdo_sqlite_create_aggregate_internal(INTERNAL_FUNCTION_PARAMETERS);
voidpdo_sqlite_create_collation_internal(INTERNAL_FUNCTION_PARAMETERS, pdo_sqlite_create_collation_callbackcallback);
#endif