meta_util.cpp 1.2 KB
Newer Older
羽飞's avatar
羽飞 已提交
1 2 3 4 5 6 7 8 9 10
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
         http://license.coscl.org.cn/MulanPSL2
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 PSL v2 for more details. */

11
// Created by Meiyi & wangyunlai.wyl on 2021/5/18.
羽飞's avatar
羽飞 已提交
12 13
//

L
Longda 已提交
14
#include "common/defs.h"
羽飞's avatar
羽飞 已提交
15 16
#include "storage/common/meta_util.h"

L
Longda 已提交
17 18 19
std::string table_meta_file(const char *base_dir, const char *table_name)
{
  return std::string(base_dir) + common::FILE_PATH_SPLIT_STR + table_name + TABLE_META_SUFFIX;
羽飞's avatar
羽飞 已提交
20
}
L
Longda 已提交
21 22 23
std::string table_data_file(const char *base_dir, const char *table_name)
{
  return std::string(base_dir) + common::FILE_PATH_SPLIT_STR + table_name + TABLE_DATA_SUFFIX;
羽飞's avatar
羽飞 已提交
24 25
}

L
Longda 已提交
26 27 28 29
std::string table_index_file(const char *base_dir, const char *table_name, const char *index_name)
{
  return std::string(base_dir) + common::FILE_PATH_SPLIT_STR + table_name + "-" + index_name + TABLE_INDEX_SUFFIX;
}