9#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
32#ifdef _ECPG_INFORMIX_H
52#ifndef ECPG_SQLTYPES_H
53#define ECPG_SQLTYPES_H
57#define CCHARTYPE ECPGt_char
58#define CSHORTTYPE ECPGt_short
59#define CINTTYPE ECPGt_int
60#define CLONGTYPE ECPGt_long
61#define CFLOATTYPE ECPGt_float
62#define CDOUBLETYPE ECPGt_double
63#define CDECIMALTYPE ECPGt_decimal
64#define CFIXCHARTYPE 108
65#define CSTRINGTYPE ECPGt_char
66#define CDATETYPE ECPGt_date
68#define CDTIMETYPE ECPGt_timestamp
69#define CLOCATORTYPE 113
70#define CVCHARTYPE ECPGt_varchar
73#define CINT8TYPE ECPGt_long_long
75#define CLVCHARTYPE 119
76#define CFIXBINTYPE 120
77#define CVARBINTYPE 121
78#define CBOOLTYPE ECPGt_bool
80#define CLVCHARPTRTYPE 124
86#define SQLCHAR ECPGt_char
87#define SQLSMINT ECPGt_short
88#define SQLINT ECPGt_int
89#define SQLFLOAT ECPGt_double
90#define SQLSMFLOAT ECPGt_float
91#define SQLDECIMAL ECPGt_decimal
92#define SQLSERIAL ECPGt_int
93#define SQLDATE ECPGt_date
94#define SQLDTIME ECPGt_timestamp
95#define SQLTEXT ECPGt_char
96#define SQLVCHAR ECPGt_char
97#define SQLINTERVAL ECPGt_interval
98#define SQLNCHAR ECPGt_char
99#define SQLNVCHAR ECPGt_char
101#define SQLINT8 ECPGt_long
102#define SQLSERIAL8 ECPGt_long
103#elif SIZEOF_LONG_LONG == 8
104#define SQLINT8 ECPGt_long_long
105#define SQLSERIAL8 ECPGt_long_long
107#error "cannot find integer type of the same size as SQLINT8"
129 printf(
"dump_sqlda called with NULL sqlda\n");
133 for (
i = 0;
i < sqlda->
sqld;
i++)
170 char * stmt1 =
"SELECT * FROM t1" ;
173 char * stmt2 =
"SELECT * FROM t1 WHERE id = ?" ;
188 strcpy(msg,
"connect");
189 {
ECPGconnect(__LINE__, 1,
"ecpg1_regression" , NULL, NULL ,
"regress1", 0);
204 strcpy(msg,
"create");
205 {
ECPGdo(__LINE__, 1, 1, NULL, 0,
ECPGst_normal,
"create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) )",
ECPGt_EOIT,
ECPGt_EORT);
212 strcpy(msg,
"insert");
213 {
ECPGdo(__LINE__, 1, 1, NULL, 0,
ECPGst_normal,
"insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' ) , ( 2 , null , null , null , null ) , ( 4 , 'd' , 4.0 , 4 , 'd' )",
ECPGt_EOIT,
ECPGt_EORT);
220 strcpy(msg,
"commit");
232 strcpy(msg,
"prepare");
240 strcpy(msg,
"declare");
262 strcpy(msg,
"fetch");
275 printf(
"FETCH RECORD %d\n", ++rec);
283 strcpy(msg,
"close");
291 strcpy(msg,
"deallocate");
307 strcpy(msg,
"prepare");
315 strcpy(msg,
"declare");
337 strcpy(msg,
"fetch");
350 printf(
"FETCH RECORD %d\n", ++rec);
358 strcpy(msg,
"close");
366 strcpy(msg,
"deallocate");
388 printf(
"EXECUTE RECORD 4\n");
394 strcpy(msg,
"prepare");
402 strcpy(msg,
"execute");
416 strcpy(msg,
"deallocate");
432 {
ECPGconnect(__LINE__, 1,
"ecpg1_regression" , NULL, NULL ,
"con2", 0);
449 printf(
"EXECUTE RECORD 4\n");
455 strcpy(msg,
"prepare");
456 {
ECPGprepare(__LINE__,
"con2", 0,
"st_id4", stmt2);
463 strcpy(msg,
"execute");
477 strcpy(msg,
"commit");
485 strcpy(msg,
"deallocate");
497 strcpy(msg,
"disconnect");
515 strcpy(msg,
"commit");
523 strcpy(msg,
"disconnect");
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)
char * ECPGprepared_statement(const char *connection_name, const char *name, int lineno)
bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
bool ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)
struct sqlvar_struct sqlvar[1]