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

Function gen_loop

src/gpre/languages/ada.cpp:2199–2234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2197//
2198
2199static void gen_loop( const act* action, int column)
2200{
2201 gen_s_start(action, column);
2202 gpre_req* request = action->act_request;
2203 gpre_port* port = request->req_primary;
2204
2205 printa(column, "if SQLCODE = 0 then");
2206 column += INDENT;
2207
2208 gen_receive(action, column, port);
2209
2210 column -= INDENT;
2211 endif(column);
2212
2213 TEXT name[MAX_REF_SIZE];
2214 gen_name(name, port->por_references, true);
2215 printa(column, "if (SQLCODE = 0) and (%s = 0) then", name);
2216 printa(column + INDENT, "SQLCODE := 100;");
2217 endif(column);
2218
2219 if (request->req_flags & REQ_sql_returning)
2220 {
2221 printa(column, "if (SQLCODE = 0) and (%s /= 0) then", name);
2222 column += INDENT;
2223
2224 gpre_nod* var_list = (gpre_nod*) action->act_object;
2225 for (int i = 0; var_list && i < var_list->nod_count; i++)
2226 {
2227 align(column);
2228 asgn_to(action, (ref*) (var_list->nod_arg[i]), column);
2229 }
2230
2231 column -= INDENT;
2232 endif(column);
2233 }
2234}
2235
2236
2237//____________________________________________________________

Callers 1

ADA_actionFunction · 0.70

Calls 7

gen_s_startFunction · 0.70
printaFunction · 0.70
gen_receiveFunction · 0.70
endifFunction · 0.70
gen_nameFunction · 0.70
alignFunction · 0.70
asgn_toFunction · 0.70

Tested by

no test coverage detected