| 505 | |
| 506 | |
| 507 | class DeclareVariableNode final : public TypedNode<StmtNode, StmtNode::TYPE_DECLARE_VARIABLE> |
| 508 | { |
| 509 | public: |
| 510 | explicit DeclareVariableNode(MemoryPool& pool) |
| 511 | : TypedNode<StmtNode, StmtNode::TYPE_DECLARE_VARIABLE>(pool) |
| 512 | { |
| 513 | varDesc.clear(); |
| 514 | } |
| 515 | |
| 516 | public: |
| 517 | static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp); |
| 518 | |
| 519 | virtual Firebird::string internalPrint(NodePrinter& printer) const; |
| 520 | virtual DeclareVariableNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); |
| 521 | virtual void genBlr(DsqlCompilerScratch* dsqlScratch); |
| 522 | virtual DeclareVariableNode* copy(thread_db* tdbb, NodeCopier& copier) const; |
| 523 | virtual DeclareVariableNode* pass1(thread_db* tdbb, CompilerScratch* csb); |
| 524 | virtual DeclareVariableNode* pass2(thread_db* tdbb, CompilerScratch* csb); |
| 525 | virtual const StmtNode* execute(thread_db* tdbb, Request* request, ExeState* exeState) const; |
| 526 | |
| 527 | public: |
| 528 | NestConst<ParameterClause> dsqlDef; |
| 529 | dsc varDesc; |
| 530 | USHORT varId = 0; |
| 531 | bool usedInSubRoutines = false; |
| 532 | }; |
| 533 | |
| 534 | |
| 535 | class EraseNode final : public TypedNode<StmtNode, StmtNode::TYPE_ERASE> |