forked from FirebirdSQL/php-firebird
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp_fbird_query_prepare.h
More file actions
executable file
·73 lines (61 loc) · 1.92 KB
/
php_fbird_query_prepare.h
File metadata and controls
executable file
·73 lines (61 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* SPDX-License-Identifier: PHP-3.01
* SPDX-FileCopyrightText: The PHP Group and contributors (see CREDITS) */
#ifndef PHP_FBIRD_QUERY_PREPARE_H
#define PHP_FBIRD_QUERY_PREPARE_H
#include "php.h"
#include "php_fbird_includes.h"
/* Max identifier size for Firebird 3+ (63 chars) but we alloc more for safety */
#define MAX_IDENTIFIER_LEN 255
/* Query preparation and cleanup functions */
/**
* Get statement type and field counts for a prepared query.
*
* @param ib_query The query structure to populate with metadata.
* @return SUCCESS on success, FAILURE on error.
*/
int _php_fbird_set_query_info(fbird_query *ib_query);
/**
* Allocate and prepare a query.
*
* @param new_query Output pointer to the allocated query structure.
* @param link Database link.
* @param trans Transaction.
* @param trans_res Transaction resource (may be NULL).
* @param query SQL query string.
* @return SUCCESS on success, FAILURE on error.
*/
int _php_fbird_prepare(fbird_query **new_query, fbird_db_link *link,
fbird_transaction *trans, zend_resource *trans_res, char *query);
/**
* Allocate XSQLDA variable buffers.
*
* @param sqlda The XSQLDA structure.
* @param nullinds Null indicator array.
*/
void _php_fbird_alloc_xsqlda_vars(XSQLDA *sqlda, ISC_SHORT *nullinds);
/**
* Free XSQLDA structure and its variable buffers.
*
* @param sqlda The XSQLDA structure to free.
*/
void _php_fbird_free_xsqlda(XSQLDA *sqlda);
/**
* Free query structure and all associated resources.
*
* @param ib_query The query structure to free.
*/
void _php_fbird_free_query(fbird_query *ib_query);
/**
* Resource destructor for query resources.
*
* @param rsrc The resource to destroy.
*/
void php_fbird_free_query_rsrc(zend_resource *rsrc);
/**
* Module initialization for query resource type.
*
* @param type Module type.
* @param module_number Module number.
*/
void php_fbird_query_minit(INIT_FUNC_ARGS);
#endif /* PHP_FBIRD_QUERY_PREPARE_H */