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

Function gen_dyn_open

src/gpre/languages/rmc.cpp:2180–2224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2178//
2179
2180static void gen_dyn_open( const act* action)
2181{
2182 TEXT s[MAX_CURSOR_SIZE];
2183 gpre_req* request;
2184 gpre_req req_const;
2185
2186 const dyn* statement = (dyn*) action->act_object;
2187 const TEXT* transaction;
2188 if (statement->dyn_trans)
2189 {
2190 transaction = statement->dyn_trans;
2191 request = &req_const;
2192 request->req_trans = transaction;
2193 }
2194 else
2195 {
2196 transaction = names[isc_trans_pos];
2197 request = NULL;
2198 }
2199
2200 make_name_formatted(s, "ISC-CONST-%s", statement->dyn_cursor_name);
2201
2202 if (gpreGlob.sw_auto)
2203 {
2204 t_start_auto(request, status_vector(action), action, true);
2205 printa(names[COLUMN], false, "IF %s NOT = 0 THEN", transaction);
2206 }
2207
2208 printa(names[COLUMN], true,
2209 statement->dyn_sqlda2 ?
2210 "CALL \"%s\" USING %s, %s, %s, %d, %s, %s" :
2211 "CALL \"%s\" USING %s, %s, %s, %d, %s",
2212 statement->dyn_sqlda2 ? ISC_OPEN2 : ISC_OPEN,
2213 status_vector(action),
2214 transaction,
2215 s,
2216 gpreGlob.sw_sql_dialect,
2217 statement->dyn_sqlda ? statement->dyn_sqlda : OMITTED,
2218 statement->dyn_sqlda2 ? statement->dyn_sqlda2 : OMITTED);
2219
2220 if (gpreGlob.sw_auto)
2221 printa(names[COLUMN], false, "END-IF");
2222
2223 set_sqlcode(action);
2224}
2225
2226
2227//____________________________________________________________

Callers 1

RMC_actionFunction · 0.70

Calls 5

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

Tested by

no test coverage detected