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

Function expandViewNodes

src/dsql/ExprNodes.cpp:129–148  ·  view source on GitHub ↗

Expand DBKEY for view

Source from the content-addressed store, hash-verified

127
128 // Expand DBKEY for view
129 void expandViewNodes(CompilerScratch* csb, StreamType baseStream,
130 ValueExprNodeStack& stack, UCHAR blrOp)
131 {
132 SortedStreamList viewStreams;
133 expandViewStreams(csb, baseStream, viewStreams);
134
135 for (auto stream : viewStreams)
136 {
137 const auto csb_tail = &csb->csb_rpt[stream];
138
139 // If relation is primitive, make DBKEY node
140
141 if (csb_tail->csb_relation)
142 {
143 const auto node = FB_NEW_POOL(csb->csb_pool) RecordKeyNode(csb->csb_pool, blrOp);
144 node->recStream = stream;
145 stack.push(node);
146 }
147 }
148 }
149
150 // Look at all RSEs which are lower in scope than the RSE which this field is
151 // referencing, and mark them as variant - the rule is that if a field from one RSE is

Callers 1

pass1Method · 0.85

Calls 3

expandViewStreamsFunction · 0.85
RecordKeyNodeClass · 0.85
pushMethod · 0.45

Tested by

no test coverage detected