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

Function CME_relation

src/gpre/cme.cpp:1119–1187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1117//
1118
1119void CME_relation(gpre_ctx* context, gpre_req* request)
1120{
1121 CMP_check(request, 0);
1122
1123 gpre_rse* rs_stream = context->ctx_stream;
1124 if (rs_stream)
1125 {
1126 CME_rse(rs_stream, request);
1127 return;
1128 }
1129
1130 gpre_prc* procedure;
1131 gpre_rel* relation = context->ctx_relation;
1132 if (relation)
1133 {
1134 if (gpreGlob.sw_ids)
1135 {
1136 if (context->ctx_alias)
1137 {
1138 request->add_byte(blr_rid2);
1139 }
1140 else
1141 {
1142 request->add_byte(blr_rid);
1143 }
1144 request->add_word(relation->rel_id);
1145 }
1146 else
1147 {
1148 if (context->ctx_alias)
1149 {
1150 request->add_byte(blr_relation2);
1151 }
1152 else
1153 request->add_byte(blr_relation);
1154 CMP_stuff_symbol(request, relation->rel_symbol);
1155 }
1156
1157 if (context->ctx_alias)
1158 {
1159 request->add_cstring(context->ctx_alias);
1160 }
1161 request->add_byte(context->ctx_internal);
1162 }
1163 else if ((procedure = context->ctx_procedure))
1164 {
1165 if (gpreGlob.sw_ids)
1166 {
1167 request->add_byte(blr_pid);
1168 request->add_word(procedure->prc_id);
1169 }
1170 else
1171 {
1172 request->add_byte(blr_procedure);
1173 CMP_stuff_symbol(request, procedure->prc_symbol);
1174 }
1175 request->add_byte(context->ctx_internal);
1176 request->add_word(procedure->prc_in_count);

Callers 3

cmp_storeFunction · 0.85
CME_rseFunction · 0.85
cmp_planFunction · 0.85

Calls 7

CMP_checkFunction · 0.85
CMP_stuff_symbolFunction · 0.85
CME_exprFunction · 0.85
add_cstringMethod · 0.80
CME_rseFunction · 0.70
add_byteMethod · 0.45
add_wordMethod · 0.45

Tested by

no test coverage detected