Prepare a relation name for processing. Allocate a new relation node.
| 1712 | |
| 1713 | // Prepare a relation name for processing. Allocate a new relation node. |
| 1714 | RecordSourceNode* 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 |
no test coverage detected