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

Function gen_ddl

src/gpre/languages/rmc.cpp:1919–1954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1917//
1918
1919static void gen_ddl( const act* action)
1920{
1921 // Set up command type for call to RDB$DDL
1922
1923 const gpre_req* request = action->act_request;
1924
1925 if (gpreGlob.sw_auto)
1926 {
1927 t_start_auto(0, status_vector(action), action, true);
1928 printa(names[COLUMN], false, "IF %s NOT = 0 THEN", names[isc_trans_pos]);
1929 }
1930
1931
1932 sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, %s, %d, %s%d\n",
1933 names[COLUMN], ISC_DDL, status_vector(action),
1934 request->req_database->dbb_name->sym_string,
1935 names[isc_trans_pos], request->req_length,
1936 names[isc_a_pos], request->req_ident);
1937
1938 RMC_print_buffer(output_buffer, true);
1939
1940 if (gpreGlob.sw_auto)
1941 {
1942 printa(names[COLUMN], false, "END-IF");
1943 printa(names[COLUMN], false, "IF %s(2) = 0 THEN", names[isc_status_pos]);
1944 printa(names[COLUMN], true, "CALL \"%s\" USING %s, %s", ISC_COMMIT_TRANSACTION,
1945 status_vector(action), names[isc_trans_pos]);
1946 printa(names[COLUMN], false, "END-IF");
1947 printa(names[COLUMN], false, "IF %s(2) NOT = 0 THEN", names[isc_status_pos]);
1948 printa(names[COLUMN], true, "CALL \"%s\" USING %s, %s",
1949 ISC_ROLLBACK_TRANSACTION, OMITTED, names[isc_trans_pos]);
1950 printa(names[COLUMN], false, "END-IF");
1951 }
1952 RMC_print_buffer(output_buffer, true);
1953 set_sqlcode(action);
1954}
1955
1956
1957//____________________________________________________________

Callers 2

RMC_actionFunction · 0.70
gen_create_databaseFunction · 0.70

Calls 5

RMC_print_bufferFunction · 0.85
t_start_autoFunction · 0.70
status_vectorFunction · 0.70
printaFunction · 0.70
set_sqlcodeFunction · 0.70

Tested by

no test coverage detected