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

Method sameAs

src/dsql/ExprNodes.cpp:341–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341bool ExprNode::sameAs(const ExprNode* other, bool ignoreStreams) const
342{
343 if (!other || other->getType() != getType())
344 return false;
345
346 NodeRefsHolder thisHolder;
347 getChildren(thisHolder, false);
348
349 NodeRefsHolder otherHolder;
350 other->getChildren(otherHolder, false);
351
352 size_t count = thisHolder.refs.getCount();
353 if (otherHolder.refs.getCount() != count)
354 return false;
355
356 const auto* j = otherHolder.refs.begin();
357
358 for (const auto i : thisHolder.refs)
359 {
360 if (!*i && !**j)
361 continue;
362
363 if (!*i || !**j || !(*i)->sameAs(**j, ignoreStreams))
364 return false;
365
366 ++j;
367 }
368
369 return true;
370}
371
372bool ExprNode::deterministic() const
373{

Callers 7

sameNodesFunction · 0.45
matchSubsetFunction · 0.45
analyzeNavigationMethod · 0.45
checkIndexConditionMethod · 0.45
checkIndexExpressionMethod · 0.45
matchBooleanMethod · 0.45
generateEquiJoinMethod · 0.45

Calls 9

DSC_EQUIVFunction · 0.85
sameNodesFunction · 0.85
JRD_get_thread_dataFunction · 0.85
MOV_compareFunction · 0.85
getTypeFunction · 0.50
getTypeMethod · 0.45
getChildrenMethod · 0.45
getCountMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected