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

Function gen_fetch

src/gpre/languages/ftn.cpp:2236–2264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2234//
2235
2236static void gen_fetch(const act* action)
2237{
2238 SCHAR s[MAX_REF_SIZE];
2239
2240 const gpre_req* request = action->act_request;
2241 if (request->req_sync)
2242 {
2243 gen_send(action, request->req_sync);
2244 printa(COLUMN, "IF (SQLCODE .EQ. 0) THEN");
2245 }
2246
2247 gen_receive(action, request->req_primary);
2248 printa(COLUMN, "IF (%s .NE. 0) THEN", gen_name(s, request->req_eof, true));
2249 printa(COLUMN, "SQLCODE = 0");
2250
2251 gpre_nod* var_list = (gpre_nod*) action->act_object;
2252 if (var_list)
2253 {
2254 for (int i = 0; i < var_list->nod_count; i++) {
2255 asgn_to(action, (const ref*) var_list->nod_arg[i]);
2256 }
2257 }
2258 printa(COLUMN, "ELSE");
2259 printa(COLUMN, "SQLCODE = 100");
2260 printa(COLUMN, "END IF");
2261
2262 if (request->req_sync)
2263 printa(COLUMN, "END IF");
2264}
2265
2266
2267//____________________________________________________________

Callers 1

FTN_actionFunction · 0.70

Calls 5

gen_sendFunction · 0.70
printaFunction · 0.70
gen_receiveFunction · 0.70
gen_nameFunction · 0.70
asgn_toFunction · 0.70

Tested by

no test coverage detected