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

Function gen_get_segment

src/gpre/languages/rmc.cpp:2774–2806  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2772//
2773
2774static void gen_get_segment( const act* action)
2775{
2776 const blb* blob;
2777
2778 if (action->act_flags & ACT_sql)
2779 blob = (blb*) action->act_request->req_blobs;
2780 else
2781 blob = (blb*) action->act_object;
2782
2783 sprintf(output_buffer, GET_SEG_CALL_TEMPLATE,
2784 names[COLUMN],
2785 ISC_GET_SEGMENT,
2786 names[isc_status_vector_pos],
2787 names[isc_a_pos], blob->blb_ident,
2788 names[isc_a_pos], blob->blb_len_ident,
2789 blob->blb_seg_length,
2790 names[isc_a_pos], blob->blb_buff_ident, names[isc_status_pos]);
2791
2792 RMC_print_buffer(output_buffer, true);
2793
2794 if (action->act_flags & ACT_sql)
2795 {
2796 const ref* into = action->act_object;
2797 set_sqlcode(action);
2798 printa(names[COLUMN], false, "IF SQLCODE = 0 OR SQLCODE = 101 THEN ");
2799 printa(names[COLUMN], false, "MOVE %s%d TO %s",
2800 names[isc_a_pos], blob->blb_buff_ident, into->ref_value);
2801 if (into->ref_null_value)
2802 printa(names[COLUMN], false, "MOVE %s%d TO %s",
2803 names[isc_a_pos], blob->blb_len_ident, into->ref_null_value);
2804 printa(names[COLUMN], false, "END-IF");
2805 }
2806}
2807
2808
2809//____________________________________________________________

Callers 3

RMC_actionFunction · 0.70
gen_blob_endFunction · 0.70
gen_blob_forFunction · 0.70

Calls 3

RMC_print_bufferFunction · 0.85
set_sqlcodeFunction · 0.70
printaFunction · 0.70

Tested by

no test coverage detected