aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/expected/sql-indicators.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/test/expected/sql-indicators.c')
-rw-r--r--src/interfaces/ecpg/test/expected/sql-indicators.c114
1 files changed, 40 insertions, 74 deletions
diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.c b/src/interfaces/ecpg/test/expected/sql-indicators.c
index 1a910ae03d7..d5a4c946683 100644
--- a/src/interfaces/ecpg/test/expected/sql-indicators.c
+++ b/src/interfaces/ecpg/test/expected/sql-indicators.c
@@ -75,6 +75,7 @@ struct sqlca_t *ECPGget_sqlca(void);
#ifdef __cplusplus
}
#endif
+
#endif
#line 3 "indicators.pgc"
@@ -91,133 +92,98 @@ struct sqlca_t *ECPGget_sqlca(void);
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
{
/* exec sql begin declare section */
-
-
-
+
+
+
#line 10 "indicators.pgc"
- int intvar = 5;
-
+ int intvar = 5 ;
+
#line 11 "indicators.pgc"
- int nullind = -1;
-
+ int nullind = - 1 ;
/* exec sql end declare section */
#line 12 "indicators.pgc"
- ECPGdebug(1, stderr);
+ ECPGdebug(1,stderr);
- {
- ECPGconnect(__LINE__, 0, "regress1", NULL, NULL, NULL, 0);
- }
+ { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
#line 16 "indicators.pgc"
- {
- ECPGsetcommit(__LINE__, "off", NULL);
- }
+ { ECPGsetcommit(__LINE__, "off", NULL);}
#line 17 "indicators.pgc"
- {
- ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"id\" int primary key , \"str\" text not null , val int null ) ", ECPGt_EOIT, ECPGt_EORT);
- }
+ { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"id\" int primary key , \"str\" text not null , val int null ) ", ECPGt_EOIT, ECPGt_EORT);}
#line 22 "indicators.pgc"
- {
- ECPGtrans(__LINE__, NULL, "commit");
- }
+ { ECPGtrans(__LINE__, NULL, "commit");}
#line 23 "indicators.pgc"
- {
- ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values( 1 , 'Hello' , 0 ) ", ECPGt_EOIT, ECPGt_EORT);
- }
+ { ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values ( 1 , 'Hello' , 0 ) ", ECPGt_EOIT, ECPGt_EORT);}
#line 25 "indicators.pgc"
/* use indicator in insert */
- {
- ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values( 2 , 'Hi there' , ? ) ",
- ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int),
- ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EOIT, ECPGt_EORT);
- }
+ { ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values ( 2 , 'Hi there' , ? ) ",
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EOIT, ECPGt_EORT);}
#line 28 "indicators.pgc"
nullind = 0;
- {
- ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values( 3 , 'Good evening' , ? ) ",
- ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int),
- ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EOIT, ECPGt_EORT);
- }
+ { ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values ( 3 , 'Good evening' , ? ) ",
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EOIT, ECPGt_EORT);}
#line 30 "indicators.pgc"
- {
- ECPGtrans(__LINE__, NULL, "commit");
- }
+ { ECPGtrans(__LINE__, NULL, "commit");}
#line 31 "indicators.pgc"
/* use indicators to get information about selects */
- {
- ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 1 ", ECPGt_EOIT,
- ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int),
- ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EORT);
- }
+ { ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 1 ", ECPGt_EOIT,
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
#line 34 "indicators.pgc"
- {
- ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 2 ", ECPGt_EOIT,
- ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int),
- ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EORT);
- }
+ { ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 2 ", ECPGt_EOIT,
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EORT);}
#line 35 "indicators.pgc"
printf("intvar: %d, nullind: %d\n", intvar, nullind);
- {
- ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 3 ", ECPGt_EOIT,
- ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int),
- ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EORT);
- }
+ { ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 3 ", ECPGt_EOIT,
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EORT);}
#line 37 "indicators.pgc"
printf("intvar: %d, nullind: %d\n", intvar, nullind);
/* use indicators for update */
- intvar = 5;
- nullind = -1;
- {
- ECPGdo(__LINE__, 0, 1, NULL, "update test set val = ? where id = 1 ",
- ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int),
- ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EOIT, ECPGt_EORT);
- }
+ intvar = 5; nullind = -1;
+ { ECPGdo(__LINE__, 0, 1, NULL, "update test set val = ? where id = 1 ",
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EOIT, ECPGt_EORT);}
#line 42 "indicators.pgc"
- {
- ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 1 ", ECPGt_EOIT,
- ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int),
- ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EORT);
- }
+ { ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 1 ", ECPGt_EOIT,
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EORT);}
#line 43 "indicators.pgc"
printf("intvar: %d, nullind: %d\n", intvar, nullind);
- {
- ECPGdo(__LINE__, 0, 1, NULL, "drop table test ", ECPGt_EOIT, ECPGt_EORT);
- }
+ { ECPGdo(__LINE__, 0, 1, NULL, "drop table test ", ECPGt_EOIT, ECPGt_EORT);}
#line 46 "indicators.pgc"
- {
- ECPGtrans(__LINE__, NULL, "commit");
- }
+ { ECPGtrans(__LINE__, NULL, "commit");}
#line 47 "indicators.pgc"
- {
- ECPGdisconnect(__LINE__, "CURRENT");
- }
+ { ECPGdisconnect(__LINE__, "CURRENT");}
#line 49 "indicators.pgc"
return 0;