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

Function PASS1_relation

src/dsql/pass1.cpp:1714–1741  ·  view source on GitHub ↗

Prepare a relation name for processing. Allocate a new relation node.

Source from the content-addressed store, hash-verified

1712
1713// Prepare a relation name for processing. Allocate a new relation node.
1714RecordSourceNode* PASS1_relation(DsqlCompilerScratch* dsqlScratch, RecordSourceNode* input)
1715{
1716 thread_db* tdbb = JRD_get_thread_data();
1717
1718 DEV_BLKCHK(dsqlScratch, dsql_type_req);
1719
1720 dsql_ctx* context = PASS1_make_context(dsqlScratch, input);
1721 RecordSourceNode* node = NULL;
1722
1723 if (context->ctx_relation)
1724 {
1725 RelationSourceNode* relNode = FB_NEW_POOL(*tdbb->getDefaultPool()) RelationSourceNode(
1726 *tdbb->getDefaultPool(), context->ctx_relation->rel_name);
1727 relNode->dsqlContext = context;
1728 return relNode;
1729 }
1730 else if (context->ctx_procedure)
1731 {
1732 ProcedureSourceNode* procNode = FB_NEW_POOL(*tdbb->getDefaultPool()) ProcedureSourceNode(
1733 *tdbb->getDefaultPool(), context->ctx_procedure->prc_name);
1734 procNode->dsqlContext = context;
1735 return procNode;
1736 }
1737 //// TODO: LocalTableSourceNode
1738
1739 fb_assert(false);
1740 return NULL;
1741}
1742
1743
1744// Concatenate 2 input strings together for a new alias string

Callers 4

dsqlPassMethod · 0.85
internalDsqlPassMethod · 0.85
dsqlPassCursorReferenceFunction · 0.85
dsqlPassRelProcFunction · 0.85

Calls 5

JRD_get_thread_dataFunction · 0.85
PASS1_make_contextFunction · 0.85
ProcedureSourceNodeClass · 0.85
RelationSourceNodeClass · 0.70
getDefaultPoolMethod · 0.45

Tested by

no test coverage detected