MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / gen_loop

Function gen_loop

src/gpre/c_cxx.cpp:2495–2532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2493//
2494
2495static void gen_loop( const act* action, int column)
2496{
2497 TEXT name[MAX_REF_SIZE];
2498
2499 gen_s_start(action, column);
2500 const gpre_req* request = action->act_request;
2501 const gpre_port* port = request->req_primary;
2502
2503 printa(column, "if (!SQLCODE) ");
2504 column += INDENT;
2505 begin(column);
2506
2507 gen_receive(action, column, port);
2508
2509 endp(column);
2510 column -= INDENT;
2511
2512 gen_name(name, port->por_references, true);
2513 printa(column, "if (!SQLCODE && !%s)", name);
2514 printa(column + INDENT, "SQLCODE = 100;");
2515
2516 if (request->req_flags & REQ_sql_returning)
2517 {
2518 printa(column, "if (!SQLCODE && %s)", name);
2519 column += INDENT;
2520 begin(column);
2521
2522 gpre_nod* var_list = (gpre_nod*) action->act_object;
2523 for (int i = 0; var_list && i < var_list->nod_count; i++)
2524 {
2525 align(column);
2526 asgn_to(action, (ref*) (var_list->nod_arg[i]), column);
2527 }
2528
2529 endp(column);
2530 column -= INDENT;
2531 }
2532}
2533
2534
2535//____________________________________________________________

Callers 1

C_CXX_actionFunction · 0.70

Calls 8

gen_s_startFunction · 0.70
printaFunction · 0.70
beginFunction · 0.70
gen_receiveFunction · 0.70
endpFunction · 0.70
gen_nameFunction · 0.70
alignFunction · 0.70
asgn_toFunction · 0.70

Tested by

no test coverage detected