xref: /PHP-8.1/ext/pdo/php_pdo_int.h (revision 01b3fc03)
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   | Author: Wez Furlong <wez@php.net>                                    |
14   |         Marcus Boerger <helly@php.net>                               |
15   |         Sterling Hughes <sterling@php.net>                           |
16   +----------------------------------------------------------------------+
17 */
18 
19 /* Stuff private to the PDO extension and not for consumption by PDO drivers
20  * */
21 
22 #include "php_pdo_error.h"
23 
24 extern HashTable pdo_driver_hash;
25 extern zend_class_entry *pdo_exception_ce;
26 int php_pdo_list_entry(void);
27 
28 void pdo_dbh_init(void);
29 void pdo_stmt_init(void);
30 
31 extern zend_object *pdo_dbh_new(zend_class_entry *ce);
32 extern const zend_function_entry pdo_dbh_functions[];
33 extern zend_class_entry *pdo_dbh_ce;
34 extern ZEND_RSRC_DTOR_FUNC(php_pdo_pdbh_dtor);
35 
36 extern zend_object *pdo_dbstmt_new(zend_class_entry *ce);
37 extern const zend_function_entry pdo_dbstmt_functions[];
38 extern zend_class_entry *pdo_dbstmt_ce;
39 void pdo_dbstmt_free_storage(zend_object *std);
40 zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int by_ref);
41 extern zend_object_handlers pdo_dbstmt_object_handlers;
42 bool pdo_stmt_describe_columns(pdo_stmt_t *stmt);
43 bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_arg_num,
44 	zval *args, uint32_t variadic_num_args);
45 
46 extern zend_object *pdo_row_new(zend_class_entry *ce);
47 extern const zend_function_entry pdo_row_functions[];
48 extern zend_class_entry *pdo_row_ce;
49 void pdo_row_free_storage(zend_object *std);
50 extern zend_object_handlers pdo_row_object_handlers;
51 
52 zend_object_iterator *php_pdo_dbstmt_iter_get(zend_class_entry *ce, zval *object);
53 
54 extern pdo_driver_t *pdo_find_driver(const char *name, int namelen);
55 
56 void pdo_sqlstate_init_error_table(void);
57 void pdo_sqlstate_fini_error_table(void);
58 const char *pdo_sqlstate_state_to_description(char *state);
59 bool pdo_hash_methods(pdo_dbh_object_t *dbh, int kind);
60