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

Function dsqlGenReturningLocalTableDecl

src/dsql/StmtNodes.cpp:9964–9979  ·  view source on GitHub ↗

Generate BLR for returning's local table declaration.

Source from the content-addressed store, hash-verified

9962
9963// Generate BLR for returning's local table declaration.
9964static void dsqlGenReturningLocalTableDecl(DsqlCompilerScratch* dsqlScratch, USHORT tableNumber)
9965{
9966 dsqlScratch->appendUChar(blr_dcl_local_table);
9967 dsqlScratch->appendUShort(tableNumber);
9968 dsqlScratch->appendUChar(blr_dcl_local_table_format);
9969 dsqlScratch->appendUShort(dsqlScratch->returningClause->second->items.getCount());
9970
9971 for (auto& retTarget : dsqlScratch->returningClause->second->items)
9972 {
9973 dsc fieldDesc;
9974 DsqlDescMaker::fromNode(dsqlScratch, &fieldDesc, retTarget);
9975 GEN_descriptor(dsqlScratch, &fieldDesc, true);
9976 }
9977
9978 dsqlScratch->appendUChar(blr_end);
9979}
9980
9981// Get the context of a relation, procedure or derived table.
9982static dsql_ctx* dsqlGetContext(const RecordSourceNode* node)

Callers 1

genBlrMethod · 0.85

Calls 4

GEN_descriptorFunction · 0.85
appendUCharMethod · 0.80
appendUShortMethod · 0.80
getCountMethod · 0.45

Tested by

no test coverage detected