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

Function gen_fetch

src/gpre/c_cxx.cpp:2150–2187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2148//
2149
2150static void gen_fetch( const act* action, int column)
2151{
2152 gpre_req* request = action->act_request;
2153
2154 if (request->req_sync)
2155 {
2156 gen_send(action, request->req_sync, column);
2157 printa(column, "if (!SQLCODE)");
2158 column += INDENT;
2159 begin(column);
2160 }
2161
2162 TEXT s[MAX_REF_SIZE];
2163 gen_receive(action, column, request->req_primary);
2164 printa(column, "if (!SQLCODE)");
2165 column += INDENT;
2166 printa(column, "if (%s)", gen_name(s, request->req_eof, true));
2167 column += INDENT;
2168 begin(column);
2169
2170 gpre_nod* var_list = (gpre_nod*) action->act_object;
2171 if (var_list)
2172 for (int i = 0; i < var_list->nod_count; i++)
2173 {
2174 align(column);
2175 asgn_to(action, (ref*) (var_list->nod_arg[i]), column);
2176 }
2177
2178 endp(column);
2179 printa(column - INDENT, "else");
2180 printa(column, "SQLCODE = 100;");
2181
2182 if (request->req_sync)
2183 {
2184 column -= INDENT;
2185 endp(column);
2186 }
2187}
2188
2189
2190//____________________________________________________________

Callers 1

C_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