| 1311 | // |
| 1312 | |
| 1313 | static void gen_ddl( const act* action, int column) |
| 1314 | { |
| 1315 | if (gpreGlob.sw_auto) |
| 1316 | { |
| 1317 | printa(column, "if (gds__trans = nil) then"); |
| 1318 | column += INDENT; |
| 1319 | t_start_auto(action, 0, status_vector(action), column + INDENT); |
| 1320 | column -= INDENT; |
| 1321 | } |
| 1322 | |
| 1323 | // Set up command type for call to RDB$DDL |
| 1324 | |
| 1325 | const gpre_req* request = action->act_request; |
| 1326 | |
| 1327 | if (gpreGlob.sw_auto) |
| 1328 | { |
| 1329 | printa(column, "if (gds__trans <> nil) then"); |
| 1330 | column += INDENT; |
| 1331 | } |
| 1332 | |
| 1333 | align(column); |
| 1334 | fprintf(gpreGlob.out_file, "GDS__DDL (%s, %s, gds__trans, %d, gds__%d);", |
| 1335 | status_vector(action), |
| 1336 | request->req_database->dbb_name->sym_string, |
| 1337 | request->req_length, request->req_ident); |
| 1338 | |
| 1339 | if (gpreGlob.sw_auto) |
| 1340 | { |
| 1341 | column -= INDENT; |
| 1342 | printa(column, "if (gds__status [2] = 0) then"); |
| 1343 | printa(column + INDENT, "GDS__COMMIT_TRANSACTION (%s, gds__trans);", status_vector(action)); |
| 1344 | printa(column, "if (gds__status [2] <> 0) then"); |
| 1345 | printa(column + INDENT, "GDS__ROLLBACK_TRANSACTION (gds__null^ , gds__trans);"); |
| 1346 | } |
| 1347 | |
| 1348 | set_sqlcode(action, column); |
| 1349 | } |
| 1350 | |
| 1351 | |
| 1352 | //____________________________________________________________ |
no test coverage detected