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

Function gen_select

src/gpre/languages/rmc.cpp:3517–3543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3515//
3516
3517static void gen_select( const act* action)
3518{
3519 TEXT name[MAX_REF_SIZE];
3520
3521 const gpre_req* request = action->act_request;
3522 const gpre_port* port = request->req_primary;
3523 gen_name(name, request->req_eof, true);
3524
3525 gen_s_start(action);
3526
3527 // BUG8321: Do not call "receive" in case if SQLCODE is not equal 0
3528 printa(names[COLUMN], false, "IF SQLCODE = 0 THEN");
3529
3530 gen_receive(action, port);
3531
3532 printa(names[COLUMN], false, "IF %s NOT = 0 THEN", name);
3533 gpre_nod* var_list = (gpre_nod*) action->act_object;
3534 if (var_list)
3535 for (int i = 0; i < var_list->nod_count; i++) {
3536 asgn_to(action, (ref*) var_list->nod_arg[i]);
3537 }
3538
3539 printa(names[COLUMN], false, "ELSE");
3540 printa(names[COLUMN], false, "MOVE 100 TO SQLCODE");
3541 printa(names[COLUMN], false, "END-IF");
3542 printa(names[COLUMN], false, "END-IF");
3543}
3544
3545
3546//____________________________________________________________

Callers 1

RMC_actionFunction · 0.70

Calls 5

gen_nameFunction · 0.70
gen_s_startFunction · 0.70
printaFunction · 0.70
gen_receiveFunction · 0.70
asgn_toFunction · 0.70

Tested by

no test coverage detected