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

Function parseMap

src/jrd/RecordSourceNodes.cpp:3824–3845  ·  view source on GitHub ↗

Parse a MAP clause for a union or global aggregate expression.

Source from the content-addressed store, hash-verified

3822
3823// Parse a MAP clause for a union or global aggregate expression.
3824static MapNode* parseMap(thread_db* tdbb, CompilerScratch* csb, StreamType stream,
3825 bool parseHeader)
3826{
3827 SET_TDBB(tdbb);
3828
3829 if (parseHeader)
3830 {
3831 if (csb->csb_blr_reader.getByte() != blr_map)
3832 PAR_syntax_error(csb, "blr_map");
3833 }
3834
3835 unsigned int count = csb->csb_blr_reader.getWord();
3836 MapNode* node = FB_NEW_POOL(csb->csb_pool) MapNode(csb->csb_pool);
3837
3838 while (count-- > 0)
3839 {
3840 node->targetList.add(PAR_gen_field(tdbb, stream, csb->csb_blr_reader.getWord()));
3841 node->sourceList.add(PAR_parse_value(tdbb, csb));
3842 }
3843
3844 return node;
3845}
3846
3847// Process a single record source stream from an RseNode.
3848// Obviously, if the source is a view, there is more work to do.

Callers 3

parseMethod · 0.85
parseWindowMethod · 0.85

Calls 8

SET_TDBBFunction · 0.85
PAR_syntax_errorFunction · 0.85
PAR_gen_fieldFunction · 0.85
PAR_parse_valueFunction · 0.85
MapNodeClass · 0.70
getByteMethod · 0.45
getWordMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected