Skip to content

Commit 57c4281

Browse files
committed
Added namespace oceanbase to src/observer
1 parent 6389d2a commit 57c4281

File tree

346 files changed

+751
-397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

346 files changed

+751
-397
lines changed

src/observer/catalog/catalog.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
99
See the Mulan PSL v2 for more details. */
1010

1111
#include "catalog/catalog.h"
12-
12+
namespace oceanbase{
1313
const TableStats &Catalog::get_table_stats(int table_id)
1414
{
1515
lock_guard<mutex> lock(mutex_);
@@ -20,4 +20,5 @@ void Catalog::update_table_stats(int table_id, const TableStats &table_stats)
2020
{
2121
lock_guard<mutex> lock(mutex_);
2222
table_stats_[table_id] = table_stats;
23-
}
23+
}
24+
}

src/observer/catalog/catalog.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ See the Mulan PSL v2 for more details. */
1212
#include "common/lang/unordered_map.h"
1313
#include "common/lang/mutex.h"
1414
#include "catalog/table_stats.h"
15-
15+
namespace oceanbase{
1616
/**
1717
* @class Catalog
1818
* @brief Store metadata, such as table statistics.
@@ -71,4 +71,5 @@ class Catalog
7171
* This map is currently not persisted and its persistence is planned via a system table.
7272
*/
7373
unordered_map<int, TableStats> table_stats_; ///< Table statistics storage.
74-
};
74+
};
75+
}

src/observer/catalog/table_stats.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
99
See the Mulan PSL v2 for more details. */
1010

1111
#pragma once
12-
12+
namespace oceanbase{
1313
/**
1414
* @class TableStats
1515
* @brief Represents statistics related to a table.
@@ -36,4 +36,5 @@ class TableStats
3636
~TableStats() = default;
3737

3838
int row_nums = 0;
39-
};
39+
};
40+
}

src/observer/common/global_context.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ See the Mulan PSL v2 for more details. */
1313
//
1414

1515
#include "common/global_context.h"
16-
16+
namespace oceanbase{
1717
static GlobalContext global_context;
1818

1919
GlobalContext &GlobalContext::instance() { return global_context; }
20+
}

src/observer/common/global_context.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See the Mulan PSL v2 for more details. */
1313
//
1414

1515
#pragma once
16-
16+
namespace oceanbase{
1717
class BufferPoolManager;
1818
class DefaultHandler;
1919
class TrxKit;
@@ -31,4 +31,5 @@ struct GlobalContext
3131
static GlobalContext &instance();
3232
};
3333

34-
#define GCTX GlobalContext::instance()
34+
#define GCTX GlobalContext::instance()
35+
}

src/observer/common/ini_setting.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ See the Mulan PSL v2 for more details. */
1515
#pragma once
1616

1717
//! this document is used for ini setting
18-
18+
namespace oceanbase{
1919
#define CLIENT_ADDRESS "CLIENT_ADDRESS"
2020
#define MAX_CONNECTION_NUM "MAX_CONNECTION_NUM"
2121
#define MAX_CONNECTION_NUM_DEFAULT 8192
@@ -25,3 +25,4 @@ See the Mulan PSL v2 for more details. */
2525
#define SOCKET_BUFFER_SIZE 8192
2626

2727
#define SESSION_STAGE_NAME "SessionStage"
28+
}

src/observer/common/init.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ See the Mulan PSL v2 for more details. */
3131
#include "storage/trx/trx.h"
3232

3333
using namespace common;
34-
34+
namespace oceanbase{
3535
bool *&_get_init()
3636
{
3737
static bool util_init = false;
@@ -236,3 +236,4 @@ void cleanup_util()
236236
}
237237

238238
void cleanup() { cleanup_util(); }
239+
}

src/observer/common/init.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ See the Mulan PSL v2 for more details. */
1616

1717
#include "common/conf/ini.h"
1818
#include "common/os/process_param.h"
19-
19+
namespace oceanbase{
2020
int init(common::ProcessParam *processParam);
2121
void cleanup();
22+
}

src/observer/common/type/attr_type.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See the Mulan PSL v2 for more details. */
1111

1212
#include "common/lang/string.h"
1313
#include "common/type/attr_type.h"
14-
14+
namespace oceanbase{
1515
const char *ATTR_TYPE_NAME[] = {"undefined", "chars", "ints", "floats", "vectors", "booleans"};
1616

1717
const char *attr_type_to_string(AttrType type)
@@ -40,4 +40,5 @@ bool is_numerical_type(AttrType type)
4040
bool is_string_type(AttrType type)
4141
{
4242
return (type == AttrType::CHARS);
43+
}
4344
}

src/observer/common/type/attr_type.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
99
See the Mulan PSL v2 for more details. */
1010

1111
#pragma once
12-
12+
namespace oceanbase{
1313
/**
1414
* @brief 属性的类型
1515
* @details AttrType 枚举列出了属性的各种数据类型。
@@ -29,3 +29,4 @@ const char *attr_type_to_string(AttrType type);
2929
AttrType attr_type_from_string(const char *s);
3030
bool is_numerical_type(AttrType type);
3131
bool is_string_type(AttrType type);
32+
}

0 commit comments

Comments
 (0)