123#line 116 "ifxquery.ec"
124#line 117 "ifxquery.ec"
125 char *connID = conn()->connectionID();
131#line 120 "ifxquery.ec"
137#line 122 "ifxquery.ec"
139#line 122 "ifxquery.ec"
140 sqli_connect_set(0, connID, 0);
141#line 122 "ifxquery.ec"
143 if (
r && SQLCODE < 0) {
154#line 131 "ifxquery.ec"
156#line 131 "ifxquery.ec"
157 sqli_curs_close(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cursorID, 256));
158#line 131 "ifxquery.ec"
160 if (
r && SQLCODE < 0) {
171#line 140 "ifxquery.ec"
173#line 140 "ifxquery.ec"
174 sqli_mt_free(cursorID);
175#line 140 "ifxquery.ec"
177 if (
r && SQLCODE < 0) {
188#line 149 "ifxquery.ec"
190#line 149 "ifxquery.ec"
191 sqli_mt_free(stmtID);
192#line 149 "ifxquery.ec"
201#line 154 "ifxquery.ec"
203#line 154 "ifxquery.ec"
204 sqli_mt_free(stmtID);
205#line 154 "ifxquery.ec"
207 if (
r && SQLCODE < 0) {
215 Query::__affectedRows = -1;
222 Query::__fieldCount = 0;
230 Query::__paramCount = 0;
255 (Query::__fieldCount == 0)
265 for(int2 i = 0; i <
__outSQLDA->sqld; i++, sqlvar++) {
266 offset = rtypalign(offset, sqlvar->sqltype);
267 mint msize = rtypmsize(sqlvar->sqltype, sqlvar->sqllen);
269 rtypname(sqlvar->sqltype), sqlvar->sqllen,
272 switch (sqlvar->sqltype & SQLTYPE) {
279 sqlvar->sqllen = msize;
311 for(int2 i = 0; i <
__outSQLDA->sqld; i++, sqlvar++) {
312 offset = rtypalign(offset, sqlvar->sqltype);
314 offset += rtypmsize(sqlvar->sqltype, sqlvar->sqllen);
325 for (
size_t i = 0; i < Query::__fieldCount; i++, sqlvar++) {
326 if (!
__fields[i].init(
this, sqlvar))
368#line 313 "ifxquery.ec"
369#line 314 "ifxquery.ec"
370 char *connID = conn()->connectionID();
372 char *sql = (
_CONST char*)_sql;
376#line 317 "ifxquery.ec"
382#line 319 "ifxquery.ec"
384#line 319 "ifxquery.ec"
385 sqli_connect_set(0, connID, 0);
386#line 319 "ifxquery.ec"
397#line 326 "ifxquery.ec"
399#line 326 "ifxquery.ec"
400 sqli_prep(ESQLINTVERSION, stmtID, sql,(ifx_literal_t *)0, (ifx_namelist_t *)0, -1, 0, 0);
401#line 326 "ifxquery.ec"
411#line 332 "ifxquery.ec"
413#line 332 "ifxquery.ec"
414 sqli_describe_input_stmt(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, stmtID, 257), &
__inSQLDA, 0);
415#line 332 "ifxquery.ec"
425 ifx_sqlvar_t* sqlvar =
__inSQLDA->sqlvar;
426 for (int2 i = 0; i <
__inSQLDA->sqld; i++, sqlvar++) {
428 rtypname(sqlvar->sqltype), sqlvar->sqltype, sqlvar->sqllen);
436#line 349 "ifxquery.ec"
438#line 349 "ifxquery.ec"
439 sqli_describe_output_stmt(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, stmtID, 257), &
__outSQLDA, 0);
440#line 349 "ifxquery.ec"
448 __STMT_STRING(SQLCODE == 0 ? SQ_SELECT : SQLCODE));
450 __stmtType = sqlca.sqlcode;
452 __stmtType = SQ_SELECT;
454 switch (__stmtType) {
477 if (_paramCount > 0) {
490#line 395 "ifxquery.ec"
491#line 396 "ifxquery.ec"
492 char *connID = conn()->connectionID();
498#line 399 "ifxquery.ec"
504#line 401 "ifxquery.ec"
506#line 401 "ifxquery.ec"
507 sqli_connect_set(0, connID, 0);
508#line 401 "ifxquery.ec"
522#line 411 "ifxquery.ec"
524#line 411 "ifxquery.ec"
525 sqli_curs_decl_dynm(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cursorID, 0), cursorID, sqli_curs_locate(ESQLINTVERSION, stmtID, 1), 0, 0);
526#line 411 "ifxquery.ec"
539#line 420 "ifxquery.ec"
541#line 420 "ifxquery.ec"
542 sqli_curs_close(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cursorID, 256));
543#line 420 "ifxquery.ec"
556#line 429 "ifxquery.ec"
558#line 429 "ifxquery.ec"
559 sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cursorID, 256),
__inSQLDA, (
char *)0, (
struct value *)0, 1, 0);
560#line 429 "ifxquery.ec"
566#line 431 "ifxquery.ec"
568#line 431 "ifxquery.ec"
569 sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cursorID, 256), (ifx_sqlda_t *)0, (
char *)0, (
struct value *)0, 0, 0);
570#line 431 "ifxquery.ec"
590#line 446 "ifxquery.ec"
592#line 447 "ifxquery.ec"
593 sqli_exec(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, stmtID, 257),
__inSQLDA, (
char *)0, (
struct value *)0,
__outSQLDA, (
char *)0, (
struct value *)0, 0);
594#line 447 "ifxquery.ec"
600#line 449 "ifxquery.ec"
602#line 449 "ifxquery.ec"
603 sqli_exec(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, stmtID, 257), (ifx_sqlda_t *)0, (
char *)0, (
struct value *)0,
__outSQLDA, (
char *)0, (
struct value *)0, 0);
604#line 449 "ifxquery.ec"
612#line 453 "ifxquery.ec"
614#line 453 "ifxquery.ec"
615 sqli_exec(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, stmtID, 257),
__inSQLDA, (
char *)0, (
struct value *)0, (ifx_sqlda_t *)0, (
char *)0, (
struct value *)0, 0);
616#line 453 "ifxquery.ec"
622#line 455 "ifxquery.ec"
624#line 455 "ifxquery.ec"
625 sqli_exec(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, stmtID, 257), (ifx_sqlda_t *)0, (
char *)0, (
struct value *)0, (ifx_sqlda_t *)0, (
char *)0, (
struct value *)0, 0);
626#line 455 "ifxquery.ec"
631 Query::__affectedRows = -1;
636 if (__stmtType == SQ_EXECPROC) {
637 for(
size_t i = 0; i < Query::__fieldCount; i++) {
644 Query::__affectedRows = sqlca.sqlerrd[2];
648 Query::__affectedRows = sqlca.sqlerrd[2];
652 for(
size_t i = 0; i < Query::__paramCount; i++) {
653 if (!(
__params[i].onAfterExecute()))
669#line 494 "ifxquery.ec"
670#line 495 "ifxquery.ec"
671 char *connID = conn()->connectionID();
676#line 497 "ifxquery.ec"
682#line 499 "ifxquery.ec"
684#line 499 "ifxquery.ec"
685 sqli_connect_set(0, connID, 0);
686#line 499 "ifxquery.ec"
697#line 506 "ifxquery.ec"
699#line 506 "ifxquery.ec"
700 static _FetchSpec _FS0 = { 0, 1, 0 };
701 sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cursorID, 256), (ifx_sqlda_t *)0,
__outSQLDA, (
char *)0, &_FS0);
702#line 506 "ifxquery.ec"
706 for (
size_t i = 0; i < Query::__fieldCount; i++) {
712 else if (SQLCODE == SQLNOTFOUND) {
719#line 519 "ifxquery.ec"
721#line 519 "ifxquery.ec"
722 sqli_curs_close(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cursorID, 256));
723#line 519 "ifxquery.ec"