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

Function gen_fetch

src/gpre/languages/pas.cpp:1913–1948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1911//
1912
1913static void gen_fetch( const act* action, int column)
1914{
1915 const gpre_req* request = action->act_request;
1916
1917 if (request->req_sync)
1918 {
1919 gen_send(action, request->req_sync, column);
1920 printa(column, "if SQLCODE = 0 then");
1921 column += INDENT;
1922 begin(column);
1923 }
1924
1925 TEXT s[MAX_REF_SIZE];
1926 gen_receive(action, column, request->req_primary);
1927 printa(column, "if SQLCODE = 0 then");
1928 column += INDENT;
1929 printa(column, "if %s <> 0 then", gen_name(s, request->req_eof, true));
1930 column += INDENT;
1931 begin(column);
1932
1933 if (gpre_nod* var_list = (gpre_nod*) action->act_object)
1934 for (int i = 0; i < var_list->nod_count; i++)
1935 {
1936 align(column);
1937 asgn_to(action, reinterpret_cast<ref*>(var_list->nod_arg[i]), column);
1938 }
1939
1940 endp(column);
1941 printa(column - INDENT, "else");
1942 printa(column, "SQLCODE := 100;");
1943 if (request->req_sync)
1944 {
1945 column -= INDENT;
1946 endp(column);
1947 }
1948}
1949
1950
1951//____________________________________________________________

Callers 1

PAS_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