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

Function gen_s_start

src/gpre/languages/ftn.cpp:3101–3146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3099//
3100
3101static void gen_s_start(const act* action)
3102{
3103 const gpre_req* request = action->act_request;
3104
3105 gen_compile(action);
3106
3107 const gpre_port* port = request->req_vport;
3108 if (port)
3109 asgn_from(action, port->por_references);
3110
3111 if (action->act_type == ACT_open)
3112 gen_cursor_open(action, request);
3113
3114 if (action->act_error || (action->act_flags & ACT_sql))
3115 make_ok_test(action, request);
3116
3117 gen_start(action, port);
3118 status_and_stop(action);
3119
3120 if (action->act_error || (action->act_flags & ACT_sql))
3121 printa(COLUMN, "END IF");
3122
3123 if (request->req_type == REQ_insert && (request->req_flags & REQ_sql_returning))
3124 {
3125 printa(COLUMN, "IF (SQLCODE .EQ. 0) THEN");
3126 gen_receive(action, request->req_primary);
3127 printa(COLUMN, "END IF");
3128
3129 printa(COLUMN, "IF (SQLCODE .EQ. 0) THEN");
3130
3131 gpre_nod* var_list = (gpre_nod*) action->act_object;
3132 for (int i = 0; var_list && i < var_list->nod_count; i++)
3133 {
3134 asgn_to(action, (ref*) (var_list->nod_arg[i]));
3135 }
3136
3137 printa(COLUMN, "END IF");
3138 }
3139
3140 if (action->act_type == ACT_open)
3141 {
3142 printa(COLUMN, "END IF");
3143 printa(COLUMN, "END IF");
3144 printa(COLUMN, "END IF");
3145 }
3146}
3147
3148
3149//____________________________________________________________

Callers 5

FTN_actionFunction · 0.70
gen_forFunction · 0.70
gen_loopFunction · 0.70
gen_selectFunction · 0.70
gen_functionFunction · 0.70

Calls 9

status_and_stopFunction · 0.85
gen_compileFunction · 0.70
asgn_fromFunction · 0.70
gen_cursor_openFunction · 0.70
make_ok_testFunction · 0.70
gen_startFunction · 0.70
printaFunction · 0.70
gen_receiveFunction · 0.70
asgn_toFunction · 0.70

Tested by

no test coverage detected