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

Function pass1Validations

src/dsql/StmtNodes.cpp:10903–10912  ·  view source on GitHub ↗

The csb->csb_validate_expr becomes true if an ancestor of the current node (the one being passed in) in the parse tree is a validation. "Ancestor" does not include the current node being passed in as an argument. If we are in a "validate subtree" (as determined by the csb->csb_validate_expr), we must not post update access to the fields involved in the validation clause. (See the call for CMP_post

Source from the content-addressed store, hash-verified

10901// post update access to the fields involved in the validation clause.
10902// (See the call for CMP_post_access in this function.)
10903static void pass1Validations(thread_db* tdbb, CompilerScratch* csb, Array<ValidateInfo>& validations)
10904{
10905 AutoSetRestore<bool> autoValidateExpr(&csb->csb_validate_expr, true);
10906
10907 for (Array<ValidateInfo>::iterator i = validations.begin(); i != validations.end(); ++i)
10908 {
10909 DmlNode::doPass1(tdbb, csb, i->boolean.getAddress());
10910 DmlNode::doPass1(tdbb, csb, i->value.getAddress());
10911 }
10912}
10913
10914ForNode* pass2FindForNode(StmtNode* node, StreamType stream)
10915{

Callers 1

pass1Method · 0.85

Calls 3

getAddressMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected