Generate a parameter list to correspond to procedure outputs.
| 3163 | |
| 3164 | // Generate a parameter list to correspond to procedure outputs. |
| 3165 | ValueListNode* ExecProcedureNode::explodeOutputs(DsqlCompilerScratch* dsqlScratch, |
| 3166 | const dsql_prc* procedure) |
| 3167 | { |
| 3168 | DEV_BLKCHK(dsqlScratch, dsql_type_req); |
| 3169 | DEV_BLKCHK(procedure, dsql_type_prc); |
| 3170 | |
| 3171 | const USHORT count = procedure->prc_out_count; |
| 3172 | ValueListNode* output = FB_NEW_POOL(dsqlScratch->getPool()) ValueListNode(dsqlScratch->getPool(), count); |
| 3173 | NestConst<ValueExprNode>* ptr = output->items.begin(); |
| 3174 | |
| 3175 | for (const dsql_fld* field = procedure->prc_outputs; field; field = field->fld_next, ++ptr) |
| 3176 | { |
| 3177 | DEV_BLKCHK(field, dsql_type_fld); |
| 3178 | |
| 3179 | ParameterNode* paramNode = FB_NEW_POOL(dsqlScratch->getPool()) ParameterNode(dsqlScratch->getPool()); |
| 3180 | *ptr = paramNode; |
| 3181 | |
| 3182 | dsql_par* parameter = paramNode->dsqlParameter = MAKE_parameter( |
| 3183 | dsqlScratch->getDsqlStatement()->getReceiveMsg(), true, true, 0, NULL); |
| 3184 | paramNode->dsqlParameterIndex = parameter->par_index; |
| 3185 | |
| 3186 | DsqlDescMaker::fromField(¶meter->par_desc, field); |
| 3187 | parameter->par_name = parameter->par_alias = field->fld_name.c_str(); |
| 3188 | parameter->par_rel_name = procedure->prc_name.identifier.c_str(); |
| 3189 | parameter->par_owner_name = procedure->prc_owner.c_str(); |
| 3190 | } |
| 3191 | |
| 3192 | return output; |
| 3193 | } |
| 3194 | |
| 3195 | string ExecProcedureNode::internalPrint(NodePrinter& printer) const |
| 3196 | { |
nothing calls this directly
no test coverage detected