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

Class DecodeNode

src/dsql/ExprNodes.h:547–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545
546
547class DecodeNode final : public TypedNode<ValueExprNode, ExprNode::TYPE_DECODE>
548{
549public:
550 explicit DecodeNode(MemoryPool& pool, ValueExprNode* aTest = NULL,
551 ValueListNode* aConditions = NULL, ValueListNode* aValues = NULL)
552 : TypedNode<ValueExprNode, ExprNode::TYPE_DECODE>(pool),
553 label(pool),
554 test(aTest),
555 conditions(aConditions),
556 values(aValues)
557 {
558 label = "DECODE";
559 }
560
561 static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
562
563 virtual void getChildren(NodeRefsHolder& holder, bool dsql) const
564 {
565 ValueExprNode::getChildren(holder, dsql);
566
567 holder.add(test);
568 holder.add(conditions);
569 holder.add(values);
570 }
571
572 virtual Firebird::string internalPrint(NodePrinter& printer) const;
573 virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
574 virtual void setParameterName(dsql_par* parameter) const;
575 virtual bool setParameterType(DsqlCompilerScratch* dsqlScratch,
576 std::function<void (dsc*)> makeDesc, bool forceVarChar);
577 virtual void genBlr(DsqlCompilerScratch* dsqlScratch);
578 virtual void make(DsqlCompilerScratch* dsqlScratch, dsc* desc);
579
580 virtual bool possiblyUnknown() const
581 {
582 return true;
583 }
584
585 virtual bool ignoreNulls(const StreamList& /*streams*/) const
586 {
587 return false;
588 }
589
590 virtual void getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc);
591 virtual ValueExprNode* copy(thread_db* tdbb, NodeCopier& copier) const;
592 virtual ValueExprNode* pass2(thread_db* tdbb, CompilerScratch* csb);
593 virtual dsc* execute(thread_db* tdbb, Request* request) const;
594
595public:
596 Firebird::string label;
597 NestConst<ValueExprNode> test;
598 NestConst<ValueListNode> conditions;
599 NestConst<ValueListNode> values;
600};
601
602
603class DefaultNode : public DsqlNode<DefaultNode, ExprNode::TYPE_DEFAULT>

Callers 3

parseMethod · 0.85
dsqlPassMethod · 0.85
copyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected