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

Function cmp_modify

src/gpre/cmp.cpp:1102–1130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1100//
1101
1102static void cmp_modify( act* action, gpre_req* request)
1103{
1104 upd* update = (upd*) action->act_object;
1105 gpre_port* port = update->upd_port;
1106 make_receive(port, request);
1107
1108 if (action->act_error)
1109 request->add_byte(blr_handler);
1110
1111 request->add_byte(blr_modify);
1112 request->add_byte(update->upd_source->ctx_internal);
1113 request->add_byte(update->upd_update->ctx_internal);
1114
1115 // count the references and build an assignment block
1116
1117 gpre_nod* list = update->upd_assignments;
1118 request->add_byte(blr_begin);
1119
1120 gpre_nod** ptr = list->nod_arg;
1121 for (const gpre_nod* const* const end = ptr + list->nod_count; ptr < end; ptr++)
1122 {
1123 const gpre_nod* field_node = (*ptr)->nod_arg[1];
1124 const ref* reference = (ref*) field_node->nod_arg[0];
1125 if ((field_node->nod_type != nod_field) || !reference->ref_master)
1126 cmp_assignment(*ptr, request);
1127 }
1128
1129 request->add_byte(blr_end);
1130}
1131
1132
1133//____________________________________________________________

Callers 1

cmp_forFunction · 0.85

Calls 3

make_receiveFunction · 0.85
cmp_assignmentFunction · 0.85
add_byteMethod · 0.45

Tested by

no test coverage detected