Merge branch 'feature/cursor-async' of https://github.com/DaveRandom/pecl-database-pq
[m6w6/ext-pq] / src / php_pqstm.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: pq |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2013, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13
14 #ifndef PHP_PQSTM_H
15 #define PHP_PQSTM_H
16
17 #include "php_pqconn.h"
18
19 typedef struct php_pqstm {
20 php_pqconn_object_t *conn;
21 char *name;
22 HashTable bound;
23 php_pq_params_t *params;
24 char *query;
25 unsigned allocated:1;
26 } php_pqstm_t;
27
28 typedef struct php_pqstm_object {
29 zend_object zo;
30 zend_object_value zv;
31 HashTable *prophandler;
32 php_pqstm_t *intern;
33 } php_pqstm_object_t;
34
35 extern zend_class_entry *php_pqstm_class_entry;
36 extern zend_object_value php_pqstm_create_object_ex(zend_class_entry *ce, php_pqstm_t *intern, php_pqstm_object_t **ptr TSRMLS_DC);
37 extern php_pqstm_t *php_pqstm_init(php_pqconn_object_t *conn, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC);
38
39 extern PHP_MINIT_FUNCTION(pqstm);
40 extern PHP_MSHUTDOWN_FUNCTION(pqstm);
41
42 #endif
43
44 /*
45 * Local variables:
46 * tab-width: 4
47 * c-basic-offset: 4
48 * End:
49 * vim600: noet sw=4 ts=4 fdm=marker
50 * vim<600: noet sw=4 ts=4
51 */