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

Function gen_select

src/gpre/languages/cob.cpp:3393–3419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3391//
3392
3393static void gen_select( const act* action)
3394{
3395 TEXT name[MAX_REF_SIZE];
3396
3397 const gpre_req* request = action->act_request;
3398 const gpre_port* port = request->req_primary;
3399 gen_name(name, request->req_eof, true);
3400
3401 gen_s_start(action);
3402
3403 // BUG8321: Do not call "receive" in case if SQLCODE is not equal 0
3404 printa(names[COLUMN], false, "IF SQLCODE = 0 THEN");
3405
3406 gen_receive(action, port);
3407
3408 printa(names[COLUMN], false, "IF %s NOT = 0 THEN", name);
3409 gpre_nod* var_list = (gpre_nod*) action->act_object;
3410 if (var_list)
3411 for (int i = 0; i < var_list->nod_count; i++) {
3412 asgn_to(action, (ref*) var_list->nod_arg[i]);
3413 }
3414
3415 printa(names[COLUMN], false, "ELSE");
3416 printa(names[COLUMN], false, "MOVE 100 TO SQLCODE");
3417 printa(names[COLUMN], false, "END-IF");
3418 printa(names[COLUMN], false, "END-IF");
3419}
3420
3421
3422//____________________________________________________________

Callers 1

COB_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