-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcatalog_mgr.h
34 lines (24 loc) · 991 Bytes
/
catalog_mgr.h
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
#pragma once
#include "benchmarks/bench.h"
#include "engine.h"
namespace ermia {
namespace catalog {
class schematable_loader : public bench_loader {
public:
schematable_loader(
unsigned long seed, ermia::Engine *db,
const std::map<std::string, ermia::OrderedIndex *> &open_tables)
: bench_loader(seed, db, open_tables) {}
protected:
virtual void load() = 0;
};
void create_schema_table(ermia::Engine *db, const char *name);
void read_schema(transaction *t, ConcurrentMasstreeIndex *schema_table_index,
ConcurrentMasstreeIndex *target_table_index,
const varstr &table_name, varstr &out_schema_value, OID *out_schema_oid);
rc_t write_schema(transaction *t, ConcurrentMasstreeIndex *schema_table_index,
const varstr &table_name, varstr &schema_value,
OID *out_schema_oid, ddl::ddl_executor *ddl_exe,
bool is_insert = false);
} // namespace catalog
} // namespace ermia