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

Function gen_select

src/gpre/languages/pas.cpp:2778–2809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2776//
2777
2778static void gen_select( const act* action, int column)
2779{
2780 TEXT name[MAX_REF_SIZE];
2781
2782 const gpre_req* request = action->act_request;
2783 const gpre_port* port = request->req_primary;
2784 gen_name(name, request->req_eof, true);
2785
2786 gen_s_start(action, column);
2787 begin(column);
2788 gen_receive(action, column, port);
2789 printa(column, "if SQLCODE = 0 then", name);
2790 column += INDENT;
2791 printa(column, "if %s <> 0 then", name);
2792 column += INDENT;
2793
2794 begin(column);
2795 const gpre_nod* var_list = (gpre_nod*) action->act_object;
2796 if (var_list)
2797 {
2798 for (int i = 0; i < var_list->nod_count; i++)
2799 {
2800 align(column);
2801 asgn_to(action, reinterpret_cast<const ref*>(var_list->nod_arg[i]), column);
2802 }
2803 }
2804
2805 printa(column - INDENT, "else");
2806 printa(column, "SQLCODE := 100;");
2807 column -= INDENT;
2808 ends(column);
2809}
2810
2811
2812//____________________________________________________________

Callers 1

PAS_actionFunction · 0.70

Calls 8

endsFunction · 0.85
gen_nameFunction · 0.70
gen_s_startFunction · 0.70
beginFunction · 0.70
gen_receiveFunction · 0.70
printaFunction · 0.70
alignFunction · 0.70
asgn_toFunction · 0.70

Tested by

no test coverage detected