| 65 | } |
| 66 | |
| 67 | DmlNode* AggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/) |
| 68 | { |
| 69 | MetaName name; |
| 70 | csb->csb_blr_reader.getMetaName(name); |
| 71 | |
| 72 | AggNode* node = NULL; |
| 73 | |
| 74 | for (const Factory* factory = factories; factory; factory = factory->next) |
| 75 | { |
| 76 | if (name == factory->name) |
| 77 | { |
| 78 | node = factory->newInstance(pool); |
| 79 | break; |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | if (!node) |
| 84 | PAR_error(csb, Arg::Gds(isc_funnotdef) << name); |
| 85 | |
| 86 | const UCHAR count = csb->csb_blr_reader.getByte(); |
| 87 | |
| 88 | NodeRefsHolder holder(pool); |
| 89 | node->getChildren(holder, false); |
| 90 | |
| 91 | if (count != holder.refs.getCount()) |
| 92 | PAR_error(csb, Arg::Gds(isc_funmismat) << name); |
| 93 | |
| 94 | node->parseArgs(tdbb, csb, count); |
| 95 | |
| 96 | return node; |
| 97 | } |
| 98 | |
| 99 | AggNode* AggNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) |
| 100 | { |
nothing calls this directly
no test coverage detected