flush
[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_pqcur_t *intern;
36 HashTable *prophandler;
37 zend_object zo;
38 } php_pqcur_object_t;
39
40 extern zend_class_entry *php_pqcur_class_entry;
41 extern php_pqcur_object_t *php_pqcur_create_object_ex(zend_class_entry *ce, php_pqcur_t *intern);
42
43 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);
44 extern php_pqcur_t *php_pqcur_init(php_pqconn_object_t *conn, const char *name, char *decl, int query_offset, long flags);
45
46 extern PHP_MINIT_FUNCTION(pqcur);
47 extern PHP_MSHUTDOWN_FUNCTION(pqcur);
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 */