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

Function gen_fetch

src/gpre/obj_cxx.cpp:2191–2228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2189//
2190
2191static void gen_fetch( const act* action, int column)
2192{
2193 gpre_req* request = action->act_request;
2194
2195 if (request->req_sync)
2196 {
2197 gen_send(action, request->req_sync, column);
2198 printa(column, "if (!SQLCODE)");
2199 column += INDENT;
2200 begin(column);
2201 }
2202
2203 TEXT s[MAX_REF_SIZE];
2204 gen_receive(action, column, request->req_primary);
2205 printa(column, "if (!SQLCODE)");
2206 column += INDENT;
2207 printa(column, "if (%s)", gen_name(s, request->req_eof, true));
2208 column += INDENT;
2209 begin(column);
2210
2211 gpre_nod* var_list = (gpre_nod*) action->act_object;
2212 if (var_list)
2213 for (int i = 0; i < var_list->nod_count; i++)
2214 {
2215 align(column);
2216 asgn_to(action, (ref*) (var_list->nod_arg[i]), column);
2217 }
2218
2219 endp(column);
2220 printa(column - INDENT, "else");
2221 printa(column, "SQLCODE = 100;");
2222
2223 if (request->req_sync)
2224 {
2225 column -= INDENT;
2226 endp(column);
2227 }
2228}
2229
2230
2231//____________________________________________________________

Callers 1

OBJ_CXX_actionFunction · 0.70

Calls 8

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

Tested by

no test coverage detected