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

Function gen_loop

src/gpre/languages/rmc.cpp:2815–2843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2813//
2814
2815static void gen_loop( const act* action)
2816{
2817 gen_s_start(action);
2818 const gpre_req* request = action->act_request;
2819 const gpre_port* port = request->req_primary;
2820
2821 printa(names[COLUMN], false, "IF SQLCODE = 0 THEN");
2822 gen_receive(action, port);
2823 printa(names[COLUMN], false, "END-IF");
2824
2825 TEXT name[MAX_REF_SIZE];
2826 gen_name(name, port->por_references, true);
2827 printa(names[COLUMN], false, "IF SQLCODE = 0 AND %s = 0 THEN ", name);
2828 printa(names[COLUMN], false, "MOVE 100 TO SQLCODE");
2829 printa(names[COLUMN], false, "END-IF");
2830
2831 if (request->req_flags & REQ_sql_returning)
2832 {
2833 printa(names[COLUMN], false, "IF SQLCODE = 0 AND %s NOT = 0 THEN", name);
2834
2835 gpre_nod* var_list = (gpre_nod*) action->act_object;
2836 for (int i = 0; var_list && i < var_list->nod_count; i++)
2837 {
2838 asgn_to(action, (ref*) (var_list->nod_arg[i]));
2839 }
2840
2841 printa(names[COLUMN], false, "END-IF");
2842 }
2843}
2844
2845
2846//____________________________________________________________

Callers 1

RMC_actionFunction · 0.70

Calls 5

gen_s_startFunction · 0.70
printaFunction · 0.70
gen_receiveFunction · 0.70
gen_nameFunction · 0.70
asgn_toFunction · 0.70

Tested by

no test coverage detected