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

Function gen_select

src/gpre/obj_cxx.cpp:3126–3164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3124//
3125
3126static void gen_select( const act* action, int column)
3127{
3128 TEXT name[MAX_REF_SIZE];
3129
3130 gpre_req* request = action->act_request;
3131 gpre_port* port = request->req_primary;
3132 gen_name(name, request->req_eof, true);
3133
3134 gen_s_start(action, column);
3135 printa(column, "if (!SQLCODE) ");
3136 column += INDENT;
3137 begin(column);
3138 gen_receive(action, column, port);
3139 printa(column, "if (!SQLCODE)");
3140 column += INDENT;
3141 begin(column);
3142 printa(column, "if (%s)", name);
3143 column += INDENT;
3144
3145 begin(column);
3146 gpre_nod* var_list = (gpre_nod*) action->act_object;
3147 if (var_list)
3148 for (int i = 0; i < var_list->nod_count; i++)
3149 {
3150 align(column);
3151 asgn_to(action, (ref*) var_list->nod_arg[i], column);
3152 }
3153
3154 endp(column);
3155
3156 printa(column - INDENT, "else");
3157 begin(column);
3158 printa(column, "SQLCODE = 100;");
3159 endp(column);
3160 column -= INDENT;
3161 endp(column);
3162 column -= INDENT;
3163 endp(column);
3164}
3165
3166
3167//____________________________________________________________

Callers 1

OBJ_CXX_actionFunction · 0.70

Calls 8

gen_nameFunction · 0.70
gen_s_startFunction · 0.70
printaFunction · 0.70
beginFunction · 0.70
gen_receiveFunction · 0.70
alignFunction · 0.70
asgn_toFunction · 0.70
endpFunction · 0.70

Tested by

no test coverage detected