MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
tuple_cell.h
1/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved.
2miniob is licensed under Mulan PSL v2.
3You can use this software according to the terms and conditions of the Mulan PSL v2.
4You may obtain a copy of Mulan PSL v2 at:
5 http://license.coscl.org.cn/MulanPSL2
6THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9See the Mulan PSL v2 for more details. */
10
11//
12// Created by WangYunlai on 2022/6/7.
13//
14
15#pragma once
16
17#include "storage/field/field_meta.h"
18
19class TupleCellSpec final
20{
21public:
22 TupleCellSpec() = default;
23 TupleCellSpec(const char *table_name, const char *field_name, const char *alias = nullptr);
24 explicit TupleCellSpec(const char *alias);
25 explicit TupleCellSpec(const string &alias);
26
27 const char *table_name() const { return table_name_.c_str(); }
28 const char *field_name() const { return field_name_.c_str(); }
29 const char *alias() const { return alias_.c_str(); }
30
31 bool equals(const TupleCellSpec &other) const
32 {
33 return table_name_ == other.table_name_ && field_name_ == other.field_name_ && alias_ == other.alias_;
34 }
35
36private:
37 string table_name_;
38 string field_name_;
39 string alias_;
40};
Definition: tuple_cell.h:20