forked from FirebirdSQL/php-firebird
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp_fbird_query_bind.h
More file actions
executable file
·37 lines (31 loc) · 1.21 KB
/
php_fbird_query_bind.h
File metadata and controls
executable file
·37 lines (31 loc) · 1.21 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
/* SPDX-License-Identifier: PHP-3.01
* SPDX-FileCopyrightText: The PHP Group and contributors (see CREDITS) */
#ifndef PHP_FBIRD_QUERY_BIND_H
#define PHP_FBIRD_QUERY_BIND_H
#include "php.h"
#include "php_fbird_includes.h"
/* Parameter binding functions */
/**
* Bind PHP values to query input SQLDA.
*
* @param ib_query The query structure containing SQLDA and bind buffers.
* @param b_vars Array of zvals to bind.
* @return SUCCESS on success, FAILURE on error.
*/
int _php_fbird_bind(fbird_query *ib_query, zval *b_vars);
int _php_fbird_xsqlda_to_msg_buffer(fbird_query *ib_query);
/**
* Safely copy data from source SQLVAR to destination SQLVAR with bounds checking.
*
* This function validates input, checks type consistency, and allocates
* memory for the copied data with comprehensive error handling.
*
* @param dest_var Destination SQLVAR.
* @param src_var Source SQLVAR.
* @param field_index Field index for error messages.
* @param query_context Query string for error messages (may be NULL).
* @return SUCCESS on success, FAILURE on error.
*/
int _php_fbird_safe_copy_sqlvar_data(XSQLVAR *dest_var, const XSQLVAR *src_var,
int field_index, const char *query_context);
#endif /* PHP_FBIRD_QUERY_BIND_H */