taco-db  0.1.0
Literal.h
Go to the documentation of this file.
1 #ifndef EXPR_LITERAL_H
2 #define EXPR_LITERAL_H
3 
4 #include "expr/ExprNode.h"
5 #include "catalog/CatCache.h"
7 
8 namespace taco {
9 
10 class Literal: public ExprNode {
11 public:
12  static std::unique_ptr<Literal>
13  Create(Datum&& val, Oid type_oid);
14 
15  ~Literal() override {}
16 
17  Datum Eval(const std::vector<NullableDatumRef>& record) const override;
18 
19  Datum Eval(const char* record) const override;
20 
21  void node_properties_to_string(std::string &buf, int indent) const override;
22 
23 private:
24  Literal(Datum &&val, Oid type_oid);
25 
27 };
28 
29 }
30 
31 #endif
A Datum stores and possibly manage the memory resource of a read-only value of a plain fixed-length C...
Definition: datum.h:250
ExprNode is an abstract class of all expressions.
Definition: ExprNode.h:29
Definition: Literal.h:10
Literal(Datum &&val, Oid type_oid)
Definition: Literal.cpp:5
static std::unique_ptr< Literal > Create(Datum &&val, Oid type_oid)
Definition: Literal.cpp:18
Datum Eval(const std::vector< NullableDatumRef > &record) const override
Evaluate function upon a deserialized record.
Definition: Literal.cpp:23
void node_properties_to_string(std::string &buf, int indent) const override
Definition: Literal.cpp:33
Datum m_value
Definition: Literal.h:26
~Literal() override
Definition: Literal.h:15
Definition: datum.h:28
uint32_t Oid
Definition: tdb_base.h:210