File: bind.h

package info (click to toggle)
unixodbc 2.2.11-16
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 17,332 kB
  • ctags: 12,399
  • sloc: ansic: 116,624; cpp: 29,333; sh: 25,024; makefile: 3,002; lex: 241; yacc: 182; perl: 142; sed: 16; sql: 1
file content (47 lines) | stat: -rw-r--r-- 1,164 bytes parent folder | download | duplicates (17)
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

/* File:            bind.h
 *
 * Description:     See "bind.c"
 *
 * Comments:        See "notice.txt" for copyright and license information.
 *
 */

#ifndef __BIND_H__
#define __BIND_H__

#include "psqlodbc.h"

/*
 * BindInfoClass -- stores information about a bound column
 */
struct BindInfoClass_ {
	Int4 buflen;		/* size of buffer */
	Int4 data_left;		/* amount of data left to read (SQLGetData) */
	char *buffer;		/* pointer to the buffer */
	SQLLEN *used;		/* used space in the buffer (for strings not counting the '\0') */
	Int2 returntype;	/* kind of conversion to be applied when returning (SQL_C_DEFAULT, SQL_C_CHAR...) */
};

/*
 * ParameterInfoClass -- stores information about a bound parameter
 */
struct ParameterInfoClass_ {
	Int4 buflen;
	char *buffer;
	SQLLEN *used;
	Int2 paramType;
	Int2 CType;
	Int2 SQLType;
	UInt4 precision;
	Int2 scale;
	Oid  lobj_oid;
	Int4 *EXEC_used;		/* amount of data OR the oid of the large object */
	char *EXEC_buffer;		/* the data or the FD of the large object */
	char data_at_exec;
};

BindInfoClass *create_empty_bindings(int num_columns);
void extend_bindings(StatementClass *stmt, int num_columns);

#endif