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

Method dsqlInvalidReferenceFinder

src/dsql/ExprNodes.cpp:6464–6482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6462}
6463
6464bool FieldNode::dsqlInvalidReferenceFinder(InvalidReferenceFinder& visitor)
6465{
6466 // Wouldn't it be better to call an error from this point where return is true?
6467 // Then we could give the fieldname that's making the trouble.
6468
6469 // If we come here then this field is used inside a aggregate-function. The
6470 // ctx_scope_level gives the info how deep the context is inside the statement.
6471
6472 // If the context-scope-level from this field is lower or the same as the scope-level
6473 // from the given context then it is an invalid field.
6474 if (dsqlContext->ctx_scope_level == visitor.context->ctx_scope_level)
6475 {
6476 // Return true (invalid) if this field isn't inside the GROUP BY clause, that
6477 // should already been seen in the match_node test in that routine start.
6478 return true;
6479 }
6480
6481 return false;
6482}
6483
6484bool FieldNode::dsqlSubSelectFinder(SubSelectFinder& /*visitor*/)
6485{

Callers

nothing calls this directly

Calls 1

visitMethod · 0.45

Tested by

no test coverage detected