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

Function gen_dyn_execute

src/gpre/languages/cob.cpp:1894–1940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1892//
1893
1894static void gen_dyn_execute( const act* action)
1895{
1896 TEXT s[MAX_CURSOR_SIZE];
1897 gpre_req* request;
1898 gpre_req req_const;
1899
1900 const dyn* statement = (dyn*) action->act_object;
1901 const TEXT* transaction;
1902 if (statement->dyn_trans)
1903 {
1904 transaction = statement->dyn_trans;
1905 request = &req_const;
1906 request->req_trans = transaction;
1907 }
1908 else
1909 {
1910 transaction = names[isc_trans_pos];
1911 request = NULL;
1912 }
1913
1914 if (gpreGlob.sw_auto)
1915 {
1916 t_start_auto(request, status_vector(action), action, true);
1917 printa(names[COLUMN], false, "IF %s NOT = 0 THEN", transaction);
1918 }
1919
1920 make_name_formatted(s, "ISC-CONST-%s", statement->dyn_statement_name);
1921
1922 printa(names[COLUMN], true,
1923 statement->dyn_sqlda2 ?
1924 "CALL \"%s\" USING %s, %s%s, %s%s, %s%d%s, %s%s, %s%s" :
1925 "CALL \"%s\" USING %s, %s%s, %s%s, %s%d%s, %s%s",
1926 statement->dyn_sqlda2 ? ISC_EXECUTE2 : ISC_EXECUTE,
1927 status_vector(action),
1928 BY_REF, transaction,
1929 BY_REF, s,
1930 BY_VALUE, gpreGlob.sw_sql_dialect, END_VALUE,
1931 statement->dyn_sqlda ? BY_REF : "",
1932 statement->dyn_sqlda ? statement->dyn_sqlda : OMITTED,
1933 statement->dyn_sqlda2 ? BY_REF : "",
1934 statement->dyn_sqlda2 ? statement->dyn_sqlda2 : OMITTED);
1935
1936 if (gpreGlob.sw_auto)
1937 printa(names[COLUMN], false, "END-IF");
1938
1939 set_sqlcode(action);
1940}
1941
1942
1943//____________________________________________________________

Callers 1

COB_actionFunction · 0.70

Calls 5

t_start_autoFunction · 0.70
status_vectorFunction · 0.70
printaFunction · 0.70
make_name_formattedFunction · 0.70
set_sqlcodeFunction · 0.70

Tested by

no test coverage detected