| 1025 | // |
| 1026 | |
| 1027 | static void gen_create_database( const act* action, int column) |
| 1028 | { |
| 1029 | const gpre_req* request = ((mdbb*) action->act_object)->mdbb_dpb_request; |
| 1030 | const gpre_dbb* db = (gpre_dbb*) request->req_database; |
| 1031 | align(column); |
| 1032 | |
| 1033 | if (request->req_length) |
| 1034 | fprintf(gpreGlob.out_file, "GDS__CREATE_DATABASE (%s, %" SIZEFORMAT ", '%s', %s, %d, gds__%d, 0);", |
| 1035 | status_vector(action), strlen(db->dbb_filename), |
| 1036 | db->dbb_filename, db->dbb_name->sym_string, |
| 1037 | request->req_length, request->req_ident); |
| 1038 | else |
| 1039 | fprintf(gpreGlob.out_file, "GDS__CREATE_DATABASE (%s, %" SIZEFORMAT ", '%s', %s, 0, 0, 0);", |
| 1040 | status_vector(action), strlen(db->dbb_filename), |
| 1041 | db->dbb_filename, db->dbb_name->sym_string); |
| 1042 | |
| 1043 | const bool save_sw_auto = gpreGlob.sw_auto; |
| 1044 | gpreGlob.sw_auto = true; |
| 1045 | printa(column, "if (gds__status [2] = 0) then"); |
| 1046 | begin(column); |
| 1047 | gen_ddl(action, column); |
| 1048 | ends(column); |
| 1049 | gpreGlob.sw_auto = save_sw_auto; |
| 1050 | column -= INDENT; |
| 1051 | set_sqlcode(action, column); |
| 1052 | } |
| 1053 | |
| 1054 | |
| 1055 | //____________________________________________________________ |
no test coverage detected