fix raphf dep
[m6w6/ext-pq] / src / php_pqtxn.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_PQTXN_H
15 #define PHP_PQTXN_H
16
17 #include "php_pqconn.h"
18
19 typedef enum php_pqtxn_isolation {
20 PHP_PQTXN_READ_COMMITTED,
21 PHP_PQTXN_REPEATABLE_READ,
22 PHP_PQTXN_SERIALIZABLE,
23 } php_pqtxn_isolation_t;
24
25 typedef struct php_pqtxn {
26 php_pqconn_object_t *conn;
27 php_pqtxn_isolation_t isolation;
28 unsigned savepoint;
29 unsigned open:1;
30 unsigned readonly:1;
31 unsigned deferrable:1;
32 } php_pqtxn_t;
33
34 typedef struct php_pqtxn_object {
35 zend_object zo;
36 zend_object_value zv;
37 HashTable *prophandler;
38 php_pqtxn_t *intern;
39 } php_pqtxn_object_t;
40
41 const char *isolation_level(long *isolation);
42
43 zend_class_entry *php_pqtxn_class_entry;
44 zend_object_value php_pqtxn_create_object_ex(zend_class_entry *ce, php_pqtxn_t *intern, php_pqtxn_object_t **ptr TSRMLS_DC);
45
46 PHP_MINIT_FUNCTION(pqtxn);
47 PHP_MSHUTDOWN_FUNCTION(pqtxn);
48
49 #endif
50
51 /*
52 * Local variables:
53 * tab-width: 4
54 * c-basic-offset: 4
55 * End:
56 * vim600: noet sw=4 ts=4 fdm=marker
57 * vim<600: noet sw=4 ts=4
58 */