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

Method dsqlMatch

src/dsql/ExprNodes.cpp:313–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311
312
313bool ExprNode::dsqlMatch(DsqlCompilerScratch* dsqlScratch, const ExprNode* other, bool ignoreMapCast) const
314{
315 if (other->getType() != getType())
316 return false;
317
318 NodeRefsHolder thisHolder(dsqlScratch->getPool());
319 getChildren(thisHolder, true);
320
321 NodeRefsHolder otherHolder(dsqlScratch->getPool());
322 other->getChildren(otherHolder, true);
323
324 size_t count = thisHolder.refs.getCount();
325 if (otherHolder.refs.getCount() != count)
326 return false;
327
328 const auto* j = otherHolder.refs.begin();
329
330 for (const auto i : thisHolder.refs)
331 {
332 if (!*i != !**j || !PASS1_node_match(dsqlScratch, *i, **j, ignoreMapCast))
333 return false;
334
335 ++j;
336 }
337
338 return true;
339}
340
341bool ExprNode::sameAs(const ExprNode* other, bool ignoreStreams) const
342{

Callers

nothing calls this directly

Calls 9

PASS1_node_matchFunction · 0.85
DSC_EQUIVFunction · 0.85
getTypeFunction · 0.50
getTypeMethod · 0.45
getChildrenMethod · 0.45
getCountMethod · 0.45
beginMethod · 0.45
lengthMethod · 0.45
getStringMethod · 0.45

Tested by

no test coverage detected