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

Function PAR_dependency

src/jrd/par.cpp:871–917  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869
870
871void PAR_dependency(thread_db* tdbb, CompilerScratch* csb, StreamType stream, SSHORT id,
872 const MetaName& field_name)
873{
874/**************************************
875 *
876 * P A R _ d e p e n d e n c y
877 *
878 **************************************
879 *
880 * Functional description
881 * Register a field, relation, procedure or exception reference
882 * as a dependency.
883 *
884 **************************************/
885 SET_TDBB(tdbb);
886
887 if (!csb->collectingDependencies())
888 return;
889
890 CompilerScratch::Dependency dependency(0);
891
892 if (csb->csb_rpt[stream].csb_relation)
893 {
894 dependency.relation = csb->csb_rpt[stream].csb_relation;
895 // How do I determine reliably this is a view?
896 // At this time, rel_view_rse is still null.
897 //if (is_view)
898 // dependency.objType = obj_view;
899 //else
900 dependency.objType = obj_relation;
901 }
902 else if (csb->csb_rpt[stream].csb_procedure)
903 {
904 if (csb->csb_rpt[stream].csb_procedure->isSubRoutine())
905 return;
906
907 dependency.procedure = csb->csb_rpt[stream].csb_procedure;
908 dependency.objType = obj_procedure;
909 }
910
911 if (field_name.length() > 0)
912 dependency.subName = FB_NEW_POOL(*tdbb->getDefaultPool()) MetaName(*tdbb->getDefaultPool(), field_name);
913 else if (id >= 0)
914 dependency.subNumber = id;
915
916 csb->addDependency(dependency);
917}
918
919
920static PlanNode* par_plan(thread_db* tdbb, CompilerScratch* csb)

Callers 3

parseMethod · 0.85
parseMethod · 0.85
PAR_make_fieldFunction · 0.85

Calls 7

SET_TDBBFunction · 0.85
isSubRoutineMethod · 0.80
addDependencyMethod · 0.80
MetaNameClass · 0.70
lengthMethod · 0.45
getDefaultPoolMethod · 0.45

Tested by

no test coverage detected