mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 02:03:04 +01:00
Remove blr_fetch, never generated by Firebird and its tools. (#6933)
This commit is contained in:
parent
ebb6006e9c
commit
c6492d4705
@ -108,7 +108,7 @@
|
||||
#define blr_dcl_variable (unsigned char)3
|
||||
#define blr_message (unsigned char)4
|
||||
#define blr_erase (unsigned char)5
|
||||
#define blr_fetch (unsigned char)6
|
||||
//#define blr_fetch (unsigned char)6
|
||||
#define blr_for (unsigned char)7
|
||||
#define blr_if (unsigned char)8
|
||||
#define blr_loop (unsigned char)9
|
||||
|
@ -162,55 +162,6 @@ namespace
|
||||
AutoPtr<CompilerScratch> m_csb;
|
||||
CompilerScratch** const m_csbPtr;
|
||||
};
|
||||
|
||||
class FetchNode
|
||||
{
|
||||
public:
|
||||
// Parse a FETCH statement, and map it into FOR x IN relation WITH x.DBKEY EQ value ...
|
||||
static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
|
||||
{
|
||||
ForNode* forNode = FB_NEW_POOL(pool) ForNode(pool);
|
||||
|
||||
// Fake RseNode.
|
||||
|
||||
RseNode* rse = forNode->rse = FB_NEW_POOL(*tdbb->getDefaultPool()) RseNode(
|
||||
*tdbb->getDefaultPool());
|
||||
|
||||
DmlNode* relationNode = PAR_parse_node(tdbb, csb);
|
||||
if (relationNode->getKind() != DmlNode::KIND_REC_SOURCE)
|
||||
PAR_syntax_error(csb, "TABLE");
|
||||
|
||||
//// TODO: LocalTableSourceNode
|
||||
auto relationSource = nodeAs<RelationSourceNode>(
|
||||
static_cast<RecordSourceNode*>(relationNode));
|
||||
|
||||
if (!relationSource)
|
||||
PAR_syntax_error(csb, "TABLE");
|
||||
|
||||
rse->rse_relations.add(relationSource);
|
||||
|
||||
// Fake boolean.
|
||||
|
||||
ComparativeBoolNode* booleanNode = FB_NEW_POOL(csb->csb_pool) ComparativeBoolNode(
|
||||
csb->csb_pool, blr_eql);
|
||||
|
||||
rse->rse_boolean = booleanNode;
|
||||
|
||||
booleanNode->arg2 = PAR_parse_value(tdbb, csb);
|
||||
|
||||
RecordKeyNode* dbKeyNode = FB_NEW_POOL(csb->csb_pool) RecordKeyNode(csb->csb_pool, blr_dbkey);
|
||||
dbKeyNode->recStream = relationSource->getStream();
|
||||
|
||||
booleanNode->arg1 = dbKeyNode;
|
||||
|
||||
// Pick up statement.
|
||||
forNode->statement = PAR_parse_stmt(tdbb, csb);
|
||||
|
||||
return forNode;
|
||||
}
|
||||
};
|
||||
|
||||
static RegisterNode<FetchNode> regFetch({blr_fetch});
|
||||
} // namespace
|
||||
|
||||
|
||||
|
@ -60,7 +60,6 @@ static const stuff a_stuff[] =
|
||||
ITEM(blr_dcl_variable, BLR, STATEMENTS)
|
||||
ITEM(blr_message, BLR, STATEMENTS)
|
||||
ITEM(blr_erase, BLR, STATEMENTS)
|
||||
ITEM(blr_fetch, BLR, STATEMENTS)
|
||||
ITEM(blr_for, BLR, STATEMENTS)
|
||||
ITEM(blr_if, BLR, STATEMENTS)
|
||||
ITEM(blr_loop, BLR, STATEMENTS)
|
||||
|
@ -414,7 +414,6 @@ set bulk_insert INSERT INTO SYMBOLS (SYMBOL, "VALUE", CLASS, "TYPE", SEQUENCE) V
|
||||
('blr_dcl_variable', 3, 'BLR', 'STATEMENTS', 220)
|
||||
('blr_message', 4, 'BLR', 'STATEMENTS', 230)
|
||||
('blr_erase', 5, 'BLR', 'STATEMENTS', 240)
|
||||
('blr_fetch', 6, 'BLR', 'STATEMENTS', 250)
|
||||
('blr_for', 7, 'BLR', 'STATEMENTS', 260)
|
||||
('blr_if', 8, 'BLR', 'STATEMENTS', 270)
|
||||
('blr_loop', 9, 'BLR', 'STATEMENTS', 280)
|
||||
|
Loading…
Reference in New Issue
Block a user