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

Function gen_s_start

src/gpre/obj_cxx.cpp:3059–3102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3057//
3058
3059static void gen_s_start( const act* action, int column)
3060{
3061 gpre_req* request = action->act_request;
3062
3063 printa(column, "for (int retries = 0; retries < 2; ++retries)");
3064 column += INDENT;
3065 begin(column);
3066 gen_compile(action, column);
3067
3068 gpre_port* port = request->req_vport;
3069 if (port)
3070 asgn_from(action, port->por_references, column);
3071
3072 if (action->act_type == ACT_open)
3073 column = gen_cursor_open(action, request, column);
3074
3075 if (action->act_error || (action->act_flags & ACT_sql))
3076 {
3077 make_ok_test(action, request, column);
3078 column += INDENT;
3079 }
3080 gen_start(action, port, column, false);
3081 if (action->act_error || (action->act_flags & ACT_sql))
3082 column -= INDENT;
3083
3084 const TEXT* pattern1 = "if (%V1->getErrors()[1] == isc_bad_req_handle) { %RH->release(); %RH = NULL; }";
3085 PAT args;
3086 args.pat_request = action->act_request;
3087 args.pat_vector1 = status_vector(action);
3088 PATTERN_expand((USHORT) column, pattern1, &args);
3089 printa(column, "else break;");
3090
3091 if (action->act_type == ACT_open)
3092 {
3093 endp(column);
3094 column -= INDENT;
3095 endp(column);
3096 column -= INDENT;
3097 }
3098
3099 endp(column);
3100 column -= INDENT;
3101 set_sqlcode(action, column);
3102}
3103
3104
3105//____________________________________________________________

Callers 5

OBJ_CXX_actionFunction · 0.70
gen_forFunction · 0.70
gen_functionFunction · 0.70
gen_loopFunction · 0.70
gen_selectFunction · 0.70

Calls 11

PATTERN_expandFunction · 0.85
printaFunction · 0.70
beginFunction · 0.70
gen_compileFunction · 0.70
asgn_fromFunction · 0.70
gen_cursor_openFunction · 0.70
make_ok_testFunction · 0.70
gen_startFunction · 0.70
status_vectorFunction · 0.70
endpFunction · 0.70
set_sqlcodeFunction · 0.70

Tested by

no test coverage detected