'make test' on Windows doesn't need you to say "mono --debug".
[versaplex.git] / vxodbc / bind.h
blob8da743614f2fccc70d0d3c413bc88dc854a922e3
1 /* File: bind.h
3 * Description: See "bind.c"
5 * Comments: See "notice.txt" for copyright and license information.
7 */
9 #ifndef __BIND_H__
10 #define __BIND_H__
12 #include "psqlodbc.h"
13 #include "descriptor.h"
16 * BindInfoClass -- stores information about a bound column
18 struct BindInfoClass_
20 SQLLEN buflen; /* size of buffer */
21 char *buffer; /* pointer to the buffer */
22 SQLLEN *used; /* used space in the buffer (for strings
23 * not counting the '\0') */
24 SQLLEN *indicator; /* indicator == used in many cases ? */
25 SQLSMALLINT returntype; /* kind of conversion to be applied when
26 * returning (SQL_C_DEFAULT,
27 * SQL_C_CHAR... etc) */
28 SQLSMALLINT precision; /* the precision for numeric or timestamp type */
29 SQLSMALLINT scale; /* the scale for numeric type */
30 /* area for work variables */
31 char dummy_data; /* currently not used */
33 typedef struct
35 char *ttlbuf; /* to save the large result */
36 SQLLEN ttlbuflen; /* the buffer length */
37 SQLLEN ttlbufused; /* used length of the buffer */
38 SQLLEN data_left; /* amount of data left to read
39 * (SQLGetData) */
40 } GetDataClass;
43 * ParameterInfoClass -- stores information about a bound parameter
45 struct ParameterInfoClass_
47 SQLLEN buflen;
48 char *buffer;
49 SQLLEN *used;
50 SQLLEN *indicator; /* indicator == used in many cases ? */
51 SQLSMALLINT CType;
52 SQLSMALLINT precision; /* the precision for numeric or timestamp type */
53 SQLSMALLINT scale; /* the scale for numeric type */
54 /* area for work variables */
55 char data_at_exec;
58 typedef struct
60 SQLLEN *EXEC_used; /* amount of data */
61 char *EXEC_buffer; /* the data */
62 } PutDataClass;
65 * ParameterImplClass -- stores implemntation information about a parameter
67 struct ParameterImplClass_
69 pgNAME paramName; /* this is unavailable even in 8.1 */
70 SQLSMALLINT paramType;
71 SQLSMALLINT SQLType;
72 OID PGType;
73 SQLULEN column_size;
74 SQLSMALLINT decimal_digits;
75 SQLSMALLINT precision; /* the precision for numeric or timestamp type */
76 SQLSMALLINT scale; /* the scale for numeric type */
79 typedef struct
81 GetDataClass fdata;
82 SQLSMALLINT allocated;
83 GetDataClass *gdata;
84 } GetDataInfo;
86 void extend_column_bindings(ARDFields *opts, int num_columns);
87 void reset_a_column_binding(ARDFields *opts, int icol);
88 int CountParameters(const StatementClass *stmt, Int2 *inCount, Int2 *ioCount, Int2 *outputCount);
89 void GetDataInfoInitialize(GetDataInfo *gdata);
90 void extend_getdata_info(GetDataInfo *gdata, int num_columns, BOOL shrink);
91 void reset_a_getdata_info(GetDataInfo *gdata, int icol);
92 void GDATA_unbind_cols(GetDataInfo *gdata, BOOL freeall);
94 #endif