PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
compat_informix-sqlda.c File Reference
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
#include <ecpg_informix.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "sqlda-native.h"
Include dependency graph for compat_informix-sqlda.c:

Go to the source code of this file.

Macros

#define ECPGdebug(X, Y)   ECPGdebug((X)+100,(Y))
 
#define ECPG_SQLDA_H
 
#define ECPG_SQLTYPES_H
 
#define CCHARTYPE   ECPGt_char
 
#define CSHORTTYPE   ECPGt_short
 
#define CINTTYPE   ECPGt_int
 
#define CLONGTYPE   ECPGt_long
 
#define CFLOATTYPE   ECPGt_float
 
#define CDOUBLETYPE   ECPGt_double
 
#define CDECIMALTYPE   ECPGt_decimal
 
#define CFIXCHARTYPE   108
 
#define CSTRINGTYPE   ECPGt_char
 
#define CDATETYPE   ECPGt_date
 
#define CMONEYTYPE   111
 
#define CDTIMETYPE   ECPGt_timestamp
 
#define CLOCATORTYPE   113
 
#define CVCHARTYPE   ECPGt_varchar
 
#define CINVTYPE   115
 
#define CFILETYPE   116
 
#define CINT8TYPE   ECPGt_long_long
 
#define CCOLLTYPE   118
 
#define CLVCHARTYPE   119
 
#define CFIXBINTYPE   120
 
#define CVARBINTYPE   121
 
#define CBOOLTYPE   ECPGt_bool
 
#define CROWTYPE   123
 
#define CLVCHARPTRTYPE   124
 
#define CTYPEMAX   25
 
#define SQLCHAR   ECPGt_char
 
#define SQLSMINT   ECPGt_short
 
#define SQLINT   ECPGt_int
 
#define SQLFLOAT   ECPGt_double
 
#define SQLSMFLOAT   ECPGt_float
 
#define SQLDECIMAL   ECPGt_decimal
 
#define SQLSERIAL   ECPGt_int
 
#define SQLDATE   ECPGt_date
 
#define SQLDTIME   ECPGt_timestamp
 
#define SQLTEXT   ECPGt_char
 
#define SQLVCHAR   ECPGt_char
 
#define SQLINTERVAL   ECPGt_interval
 
#define SQLNCHAR   ECPGt_char
 
#define SQLNVCHAR   ECPGt_char
 

Typedefs

typedef struct sqlvar_struct sqlvar_t
 
typedef struct sqlda_struct sqlda_t
 

Functions

static void dump_sqlda (sqlda_t *sqlda)
 
int main (void)
 

Variables

sqlda_tinp_sqlda
 
sqlda_toutp_sqlda
 

Macro Definition Documentation

◆ CBOOLTYPE

#define CBOOLTYPE   ECPGt_bool

Definition at line 78 of file compat_informix-sqlda.c.

◆ CCHARTYPE

#define CCHARTYPE   ECPGt_char

Definition at line 57 of file compat_informix-sqlda.c.

◆ CCOLLTYPE

#define CCOLLTYPE   118

Definition at line 74 of file compat_informix-sqlda.c.

◆ CDATETYPE

#define CDATETYPE   ECPGt_date

Definition at line 66 of file compat_informix-sqlda.c.

◆ CDECIMALTYPE

#define CDECIMALTYPE   ECPGt_decimal

Definition at line 63 of file compat_informix-sqlda.c.

◆ CDOUBLETYPE

#define CDOUBLETYPE   ECPGt_double

Definition at line 62 of file compat_informix-sqlda.c.

◆ CDTIMETYPE

#define CDTIMETYPE   ECPGt_timestamp

Definition at line 68 of file compat_informix-sqlda.c.

◆ CFILETYPE

#define CFILETYPE   116

Definition at line 72 of file compat_informix-sqlda.c.

◆ CFIXBINTYPE

#define CFIXBINTYPE   120

Definition at line 76 of file compat_informix-sqlda.c.

◆ CFIXCHARTYPE

#define CFIXCHARTYPE   108

Definition at line 64 of file compat_informix-sqlda.c.

◆ CFLOATTYPE

#define CFLOATTYPE   ECPGt_float

Definition at line 61 of file compat_informix-sqlda.c.

◆ CINT8TYPE

#define CINT8TYPE   ECPGt_long_long

Definition at line 73 of file compat_informix-sqlda.c.

◆ CINTTYPE

#define CINTTYPE   ECPGt_int

Definition at line 59 of file compat_informix-sqlda.c.

◆ CINVTYPE

#define CINVTYPE   115

Definition at line 71 of file compat_informix-sqlda.c.

◆ CLOCATORTYPE

#define CLOCATORTYPE   113

Definition at line 69 of file compat_informix-sqlda.c.

◆ CLONGTYPE

#define CLONGTYPE   ECPGt_long

Definition at line 60 of file compat_informix-sqlda.c.

◆ CLVCHARPTRTYPE

#define CLVCHARPTRTYPE   124

Definition at line 80 of file compat_informix-sqlda.c.

◆ CLVCHARTYPE

#define CLVCHARTYPE   119

Definition at line 75 of file compat_informix-sqlda.c.

◆ CMONEYTYPE

#define CMONEYTYPE   111

Definition at line 67 of file compat_informix-sqlda.c.

◆ CROWTYPE

#define CROWTYPE   123

Definition at line 79 of file compat_informix-sqlda.c.

◆ CSHORTTYPE

#define CSHORTTYPE   ECPGt_short

Definition at line 58 of file compat_informix-sqlda.c.

◆ CSTRINGTYPE

#define CSTRINGTYPE   ECPGt_char

Definition at line 65 of file compat_informix-sqlda.c.

◆ CTYPEMAX

#define CTYPEMAX   25

Definition at line 81 of file compat_informix-sqlda.c.

◆ CVARBINTYPE

#define CVARBINTYPE   121

Definition at line 77 of file compat_informix-sqlda.c.

◆ CVCHARTYPE

#define CVCHARTYPE   ECPGt_varchar

Definition at line 70 of file compat_informix-sqlda.c.

◆ ECPG_SQLDA_H

#define ECPG_SQLDA_H

Definition at line 30 of file compat_informix-sqlda.c.

◆ ECPG_SQLTYPES_H

#define ECPG_SQLTYPES_H

Definition at line 53 of file compat_informix-sqlda.c.

◆ ECPGdebug

#define ECPGdebug (   X,
 
)    ECPGdebug((X)+100,(Y))

Definition at line 9 of file compat_informix-sqlda.c.

◆ SQLCHAR

#define SQLCHAR   ECPGt_char

Definition at line 86 of file compat_informix-sqlda.c.

◆ SQLDATE

#define SQLDATE   ECPGt_date

Definition at line 93 of file compat_informix-sqlda.c.

◆ SQLDECIMAL

#define SQLDECIMAL   ECPGt_decimal

Definition at line 91 of file compat_informix-sqlda.c.

◆ SQLDTIME

#define SQLDTIME   ECPGt_timestamp

Definition at line 94 of file compat_informix-sqlda.c.

◆ SQLFLOAT

#define SQLFLOAT   ECPGt_double

Definition at line 89 of file compat_informix-sqlda.c.

◆ SQLINT

#define SQLINT   ECPGt_int

Definition at line 88 of file compat_informix-sqlda.c.

◆ SQLINTERVAL

#define SQLINTERVAL   ECPGt_interval

Definition at line 97 of file compat_informix-sqlda.c.

◆ SQLNCHAR

#define SQLNCHAR   ECPGt_char

Definition at line 98 of file compat_informix-sqlda.c.

◆ SQLNVCHAR

#define SQLNVCHAR   ECPGt_char

Definition at line 99 of file compat_informix-sqlda.c.

◆ SQLSERIAL

#define SQLSERIAL   ECPGt_int

Definition at line 92 of file compat_informix-sqlda.c.

◆ SQLSMFLOAT

#define SQLSMFLOAT   ECPGt_float

Definition at line 90 of file compat_informix-sqlda.c.

◆ SQLSMINT

#define SQLSMINT   ECPGt_short

Definition at line 87 of file compat_informix-sqlda.c.

◆ SQLTEXT

#define SQLTEXT   ECPGt_char

Definition at line 95 of file compat_informix-sqlda.c.

◆ SQLVCHAR

#define SQLVCHAR   ECPGt_char

Definition at line 96 of file compat_informix-sqlda.c.

Typedef Documentation

◆ sqlda_t

typedef struct sqlda_struct sqlda_t

Definition at line 42 of file compat_informix-sqlda.c.

◆ sqlvar_t

typedef struct sqlvar_struct sqlvar_t

Definition at line 41 of file compat_informix-sqlda.c.

Function Documentation

◆ dump_sqlda()

static void dump_sqlda ( sqlda_t sqlda)
static

Definition at line 123 of file compat_informix-sqlda.c.

124{
125 int i;
126
127 if (sqlda == NULL)
128 {
129 printf("dump_sqlda called with NULL sqlda\n");
130 return;
131 }
132
133 for (i = 0; i < sqlda->sqld; i++)
134 {
135 if (sqlda->sqlvar[i].sqlind && *(sqlda->sqlvar[i].sqlind) == -1)
136 printf("name sqlda descriptor: '%s' value NULL'\n", sqlda->sqlvar[i].sqlname);
137 else
138 switch (sqlda->sqlvar[i].sqltype)
139 {
140 case SQLCHAR:
141 printf("name sqlda descriptor: '%s' value '%s'\n", sqlda->sqlvar[i].sqlname, sqlda->sqlvar[i].sqldata);
142 break;
143 case SQLINT:
144 printf("name sqlda descriptor: '%s' value %d\n", sqlda->sqlvar[i].sqlname, *(int *)sqlda->sqlvar[i].sqldata);
145 break;
146 case SQLFLOAT:
147 printf("name sqlda descriptor: '%s' value %f\n", sqlda->sqlvar[i].sqlname, *(double *)sqlda->sqlvar[i].sqldata);
148 break;
149 case SQLDECIMAL:
150 {
151 char val[64];
152 dectoasc((decimal *)sqlda->sqlvar[i].sqldata, val, 64, -1);
153 printf("name sqlda descriptor: '%s' value DECIMAL '%s'\n", sqlda->sqlvar[i].sqlname, val);
154 break;
155 }
156 }
157 }
158}
#define SQLCHAR
#define SQLFLOAT
#define SQLDECIMAL
#define SQLINT
long val
Definition: informix.c:689
int dectoasc(decimal *np, char *cp, int len, int right)
Definition: informix.c:381
int i
Definition: isn.c:72
#define printf(...)
Definition: port.h:244
struct sqlvar_struct sqlvar[1]
Definition: sqlda-native.h:40
struct sqlname sqlname
Definition: sqlda-native.h:30
char * sqldata
Definition: sqlda-native.h:28
short * sqlind
Definition: sqlda-native.h:29

References dectoasc(), i, printf, SQLCHAR, sqlda_struct::sqld, sqlvar_struct::sqldata, SQLDECIMAL, SQLFLOAT, sqlvar_struct::sqlind, SQLINT, sqlvar_struct::sqlname, sqlvar_struct::sqltype, sqlda_struct::sqlvar, and val.

Referenced by main().

◆ main()

int main ( void  )

Definition at line 161 of file compat_informix-sqlda.c.

162{
163/* exec sql begin declare section */
164
165
166
167
168
169#line 57 "sqlda.pgc"
170 char * stmt1 = "SELECT * FROM t1" ;
171
172#line 58 "sqlda.pgc"
173 char * stmt2 = "SELECT * FROM t1 WHERE id = ?" ;
174
175#line 59 "sqlda.pgc"
176 int rec ;
177
178#line 60 "sqlda.pgc"
179 int id ;
180/* exec sql end declare section */
181#line 61 "sqlda.pgc"
182
183
184 char msg[128];
185
186 ECPGdebug(1, stderr);
187
188 strcpy(msg, "connect");
189 { ECPGconnect(__LINE__, 1, "ecpg1_regression" , NULL, NULL , "regress1", 0);
190#line 68 "sqlda.pgc"
191
192if (sqlca.sqlcode < 0) exit (1);}
193#line 68 "sqlda.pgc"
194
195
196 strcpy(msg, "set");
197 { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
198#line 71 "sqlda.pgc"
199
200if (sqlca.sqlcode < 0) exit (1);}
201#line 71 "sqlda.pgc"
202
203
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);
206#line 79 "sqlda.pgc"
207
208if (sqlca.sqlcode < 0) exit (1);}
209#line 79 "sqlda.pgc"
210
211
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);
214#line 85 "sqlda.pgc"
215
216if (sqlca.sqlcode < 0) exit (1);}
217#line 85 "sqlda.pgc"
218
219
220 strcpy(msg, "commit");
221 { ECPGtrans(__LINE__, NULL, "commit");
222#line 88 "sqlda.pgc"
223
224if (sqlca.sqlcode < 0) exit (1);}
225#line 88 "sqlda.pgc"
226
227
228 /* SQLDA test for getting all records from a table */
229
230 outp_sqlda = NULL;
231
232 strcpy(msg, "prepare");
233 { ECPGprepare(__LINE__, NULL, 0, "st_id1", stmt1);
234#line 95 "sqlda.pgc"
235
236if (sqlca.sqlcode < 0) exit (1);}
237#line 95 "sqlda.pgc"
238
239
240 strcpy(msg, "declare");
241 /* declare mycur1 cursor for $1 */
242#line 98 "sqlda.pgc"
243
244
245 strcpy(msg, "open");
246 { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "declare mycur1 cursor for $1",
247 ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
248 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
249#line 101 "sqlda.pgc"
250
251if (sqlca.sqlcode < 0) exit (1);}
252#line 101 "sqlda.pgc"
253
254
255 /* exec sql whenever not found break ; */
256#line 103 "sqlda.pgc"
257
258
259 rec = 0;
260 while (1)
261 {
262 strcpy(msg, "fetch");
263 { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "fetch 1 from mycur1", ECPGt_EOIT,
264 ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
265 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
266#line 109 "sqlda.pgc"
267
268if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
269#line 109 "sqlda.pgc"
270
271if (sqlca.sqlcode < 0) exit (1);}
272#line 109 "sqlda.pgc"
273
274
275 printf("FETCH RECORD %d\n", ++rec);
277 }
278
279 /* exec sql whenever not found continue ; */
280#line 115 "sqlda.pgc"
281
282
283 strcpy(msg, "close");
284 { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "close mycur1", ECPGt_EOIT, ECPGt_EORT);
285#line 118 "sqlda.pgc"
286
287if (sqlca.sqlcode < 0) exit (1);}
288#line 118 "sqlda.pgc"
289
290
291 strcpy(msg, "deallocate");
292 { ECPGdeallocate(__LINE__, 1, NULL, "st_id1");
293#line 121 "sqlda.pgc"
294
295if (sqlca.sqlcode < 0) exit (1);}
296#line 121 "sqlda.pgc"
297
298
300
301 /* SQLDA test for getting all records from a table
302 using the Informix-specific FETCH ... USING DESCRIPTOR
303 */
304
305 outp_sqlda = NULL;
306
307 strcpy(msg, "prepare");
308 { ECPGprepare(__LINE__, NULL, 0, "st_id2", stmt1);
309#line 132 "sqlda.pgc"
310
311if (sqlca.sqlcode < 0) exit (1);}
312#line 132 "sqlda.pgc"
313
314
315 strcpy(msg, "declare");
316 /* declare mycur2 cursor for $1 */
317#line 135 "sqlda.pgc"
318
319
320 strcpy(msg, "open");
321 { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "declare mycur2 cursor for $1",
322 ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
323 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
324#line 138 "sqlda.pgc"
325
326if (sqlca.sqlcode < 0) exit (1);}
327#line 138 "sqlda.pgc"
328
329
330 /* exec sql whenever not found break ; */
331#line 140 "sqlda.pgc"
332
333
334 rec = 0;
335 while (1)
336 {
337 strcpy(msg, "fetch");
338 { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "fetch from mycur2", ECPGt_EOIT,
339 ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
340 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
341#line 146 "sqlda.pgc"
342
343if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
344#line 146 "sqlda.pgc"
345
346if (sqlca.sqlcode < 0) exit (1);}
347#line 146 "sqlda.pgc"
348
349
350 printf("FETCH RECORD %d\n", ++rec);
352 }
353
354 /* exec sql whenever not found continue ; */
355#line 152 "sqlda.pgc"
356
357
358 strcpy(msg, "close");
359 { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "close mycur2", ECPGt_EOIT, ECPGt_EORT);
360#line 155 "sqlda.pgc"
361
362if (sqlca.sqlcode < 0) exit (1);}
363#line 155 "sqlda.pgc"
364
365
366 strcpy(msg, "deallocate");
367 { ECPGdeallocate(__LINE__, 1, NULL, "st_id2");
368#line 158 "sqlda.pgc"
369
370if (sqlca.sqlcode < 0) exit (1);}
371#line 158 "sqlda.pgc"
372
373
375
376 /* SQLDA test for getting one record using an input descriptor */
377
378 /* Input sqlda has to be built manually */
379 inp_sqlda = (sqlda_t *)malloc(sizeof(sqlda_t));
380 memset(inp_sqlda, 0, sizeof(sqlda_t));
381 inp_sqlda->sqld = 1;
382 inp_sqlda->sqlvar = malloc(sizeof(sqlvar_t));
383 memset(inp_sqlda->sqlvar, 0, sizeof(sqlvar_t));
384
386 inp_sqlda->sqlvar[0].sqldata = (char *)&id;
387
388 printf("EXECUTE RECORD 4\n");
389
390 id = 4;
391
392 outp_sqlda = NULL;
393
394 strcpy(msg, "prepare");
395 { ECPGprepare(__LINE__, NULL, 0, "st_id3", stmt2);
396#line 181 "sqlda.pgc"
397
398if (sqlca.sqlcode < 0) exit (1);}
399#line 181 "sqlda.pgc"
400
401
402 strcpy(msg, "execute");
403 { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_execute, "st_id3",
404 ECPGt_sqlda, &inp_sqlda, 0L, 0L, 0L,
405 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
406 ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
407 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
408#line 184 "sqlda.pgc"
409
410if (sqlca.sqlcode < 0) exit (1);}
411#line 184 "sqlda.pgc"
412
413
415
416 strcpy(msg, "deallocate");
417 { ECPGdeallocate(__LINE__, 1, NULL, "st_id3");
418#line 189 "sqlda.pgc"
419
420if (sqlca.sqlcode < 0) exit (1);}
421#line 189 "sqlda.pgc"
422
423
427
428 /* SQLDA test for getting one record using an input descriptor
429 * on a named connection
430 */
431
432 { ECPGconnect(__LINE__, 1, "ecpg1_regression" , NULL, NULL , "con2", 0);
433#line 199 "sqlda.pgc"
434
435if (sqlca.sqlcode < 0) exit (1);}
436#line 199 "sqlda.pgc"
437
438
439 /* Input sqlda has to be built manually */
440 inp_sqlda = (sqlda_t *)malloc(sizeof(sqlda_t));
441 memset(inp_sqlda, 0, sizeof(sqlda_t));
442 inp_sqlda->sqld = 1;
443 inp_sqlda->sqlvar = malloc(sizeof(sqlvar_t));
444 memset(inp_sqlda->sqlvar, 0, sizeof(sqlvar_t));
445
447 inp_sqlda->sqlvar[0].sqldata = (char *)&id;
448
449 printf("EXECUTE RECORD 4\n");
450
451 id = 4;
452
453 outp_sqlda = NULL;
454
455 strcpy(msg, "prepare");
456 { ECPGprepare(__LINE__, "con2", 0, "st_id4", stmt2);
457#line 218 "sqlda.pgc"
458
459if (sqlca.sqlcode < 0) exit (1);}
460#line 218 "sqlda.pgc"
461
462
463 strcpy(msg, "execute");
464 { ECPGdo(__LINE__, 1, 1, "con2", 0, ECPGst_execute, "st_id4",
465 ECPGt_sqlda, &inp_sqlda, 0L, 0L, 0L,
466 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
467 ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
468 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
469#line 221 "sqlda.pgc"
470
471if (sqlca.sqlcode < 0) exit (1);}
472#line 221 "sqlda.pgc"
473
474
476
477 strcpy(msg, "commit");
478 { ECPGtrans(__LINE__, "con2", "commit");
479#line 226 "sqlda.pgc"
480
481if (sqlca.sqlcode < 0) exit (1);}
482#line 226 "sqlda.pgc"
483
484
485 strcpy(msg, "deallocate");
486 { ECPGdeallocate(__LINE__, 1, NULL, "st_id4");
487#line 229 "sqlda.pgc"
488
489if (sqlca.sqlcode < 0) exit (1);}
490#line 229 "sqlda.pgc"
491
492
496
497 strcpy(msg, "disconnect");
498 { ECPGdisconnect(__LINE__, "con2");
499#line 236 "sqlda.pgc"
500
501if (sqlca.sqlcode < 0) exit (1);}
502#line 236 "sqlda.pgc"
503
504
505 /* End test */
506
507 strcpy(msg, "drop");
508 { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "drop table t1", ECPGt_EOIT, ECPGt_EORT);
509#line 241 "sqlda.pgc"
510
511if (sqlca.sqlcode < 0) exit (1);}
512#line 241 "sqlda.pgc"
513
514
515 strcpy(msg, "commit");
516 { ECPGtrans(__LINE__, NULL, "commit");
517#line 244 "sqlda.pgc"
518
519if (sqlca.sqlcode < 0) exit (1);}
520#line 244 "sqlda.pgc"
521
522
523 strcpy(msg, "disconnect");
524 { ECPGdisconnect(__LINE__, "CURRENT");
525#line 247 "sqlda.pgc"
526
527if (sqlca.sqlcode < 0) exit (1);}
528#line 247 "sqlda.pgc"
529
530
531 return 0;
532}
static void dump_sqlda(sqlda_t *sqlda)
sqlda_t * inp_sqlda
#define ECPGdebug(X, Y)
sqlda_t * outp_sqlda
bool ECPGdisconnect(int lineno, const char *connection_name)
Definition: connect.c:676
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
Definition: connect.c:255
#define ECPG_NOT_FOUND
Definition: ecpgerrno.h:10
@ ECPGst_normal
Definition: ecpgtype.h:97
@ ECPGst_execute
Definition: ecpgtype.h:98
@ ECPGt_EOIT
Definition: ecpgtype.h:62
@ ECPGt_sqlda
Definition: ecpgtype.h:66
@ ECPGt_char_variable
Definition: ecpgtype.h:60
@ ECPGt_NO_INDICATOR
Definition: ecpgtype.h:64
@ ECPGt_EORT
Definition: ecpgtype.h:63
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,...)
Definition: execute.c:2275
#define free(a)
Definition: header.h:65
#define malloc(a)
Definition: header.h:50
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)
Definition: misc.c:160
char * ECPGprepared_statement(const char *connection_name, const char *name, int lineno)
Definition: prepare.c:368
bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
Definition: prepare.c:217
bool ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)
Definition: prepare.c:315
exit(1)
#define sqlca
Definition: sqlca.h:59

References dump_sqlda(), ECPG_NOT_FOUND, ECPGconnect(), ECPGdeallocate(), ECPGdebug, ECPGdisconnect(), ECPGdo(), ECPGprepare(), ECPGprepared_statement(), ECPGst_execute, ECPGst_normal, ECPGt_char_variable, ECPGt_EOIT, ECPGt_EORT, ECPGt_NO_INDICATOR, ECPGt_sqlda, ECPGtrans(), exit(), free, inp_sqlda, malloc, outp_sqlda, printf, sqlca, sqlda_struct::sqld, sqlvar_struct::sqldata, SQLINT, sqlvar_struct::sqltype, and sqlda_struct::sqlvar.

Variable Documentation

◆ inp_sqlda

sqlda_t* inp_sqlda

Definition at line 120 of file compat_informix-sqlda.c.

Referenced by main().

◆ outp_sqlda

sqlda_t * outp_sqlda

Definition at line 120 of file compat_informix-sqlda.c.

Referenced by main().