Merge branch 'v1.0.x'
[m6w6/ext-pq] / src / php_pqcur.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 #ifndef PHP_PQCUR_H
14 #define PHP_PQCUR_H
15
16 #include "php_pqconn.h"
17
18 #define PHP_PQ_DECLARE_BINARY 0x01
19 #define PHP_PQ_DECLARE_INSENSITIVE 0x02
20 #define PHP_PQ_DECLARE_WITH_HOLD 0x04
21
22 #define PHP_PQ_DECLARE_SCROLL 0x10
23 #define PHP_PQ_DECLARE_NO_SCROLL 0x20
24
25 typedef struct php_pqcur {
26 php_pqconn_object_t *conn;
27 char *name;
28 char *decl;
29 unsigned open:1;
30 int query_offset;
31 long flags;
32 } php_pqcur_t;
33
34 typedef struct php_pqcur_object {
35 PHP_PQ_OBJ_DECL(php_pqcur_t *)
36 } php_pqcur_object_t;
37
38 extern zend_class_entry *php_pqcur_class_entry;
39 extern php_pqcur_object_t *php_pqcur_create_object_ex(zend_class_entry *ce, php_pqcur_t *intern);
40
41 extern char *php_pqcur_declare_str(const char *name_str, size_t name_len, unsigned flags, const char *query_str, size_t query_len, int *query_offset);
42 extern php_pqcur_t *php_pqcur_init(php_pqconn_object_t *conn, const char *name, char *decl, int query_offset, long flags);
43
44 extern PHP_MINIT_FUNCTION(pqcur);
45 extern PHP_MSHUTDOWN_FUNCTION(pqcur);
46
47 #endif
48
49 /*
50 * Local variables:
51 * tab-width: 4
52 * c-basic-offset: 4
53 * End:
54 * vim600: noet sw=4 ts=4 fdm=marker
55 * vim<600: noet sw=4 ts=4
56 */