forked from oceanbase/oceanbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathob_const_expr.h
More file actions
55 lines (45 loc) · 1.24 KB
/
ob_const_expr.h
File metadata and controls
55 lines (45 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PubL v2 for more details.
*/
#ifndef OB_CONST_EXPR_H
#define OB_CONST_EXPR_H
#include <stdint.h>
#include "common/object/ob_object.h"
#include "sql/resolver/expr/ob_expr.h"
namespace oceanbase {
namespace jit {
namespace expr {
// OceanBase constant expression.
class ObConstExpr : virtual public ObExpr {
public:
ObConstExpr()
{
set_expr_class(EXPR_CONST);
}
virtual ~ObConstExpr()
{}
common::ObObj& get_value();
const common::ObObj& get_value() const;
protected:
common::ObObj value_;
};
inline common::ObObj& ObConstExpr::get_value()
{
return value_;
}
inline const common::ObObj& ObConstExpr::get_value() const
{
return value_;
}
} // namespace expr
} // namespace jit
} // namespace oceanbase
#endif /* OB_CONST_EXPR_H */