1
+ // ===----------------------------------------------------------------------===//
2
+ //
3
+ // BusTub
4
+ //
5
+ // execution_common.cpp
6
+ //
7
+ // Identification: src/execution/execution_common.cpp
8
+ //
9
+ // Copyright (c) 2024-2024, Carnegie Mellon University Database Group
10
+ //
11
+ // ===----------------------------------------------------------------------===//
12
+
1
13
#include " execution/execution_common.h"
14
+
2
15
#include " catalog/catalog.h"
3
- #include " common/config.h"
4
16
#include " common/macros.h"
5
17
#include " concurrency/transaction_manager.h"
6
18
#include " fmt/core.h"
7
19
#include " storage/table/table_heap.h"
8
- #include " type/value.h"
9
- #include " type/value_factory.h"
10
20
11
21
namespace bustub {
12
22
@@ -38,6 +48,7 @@ auto ReconstructTuple(const Schema *schema, const Tuple &base_tuple, const Tuple
38
48
const std::vector<UndoLog> &undo_logs) -> std::optional<Tuple> {
39
49
UNIMPLEMENTED (" not implemented" );
40
50
}
51
+
41
52
/* *
42
53
* @brief Collects the undo logs sufficient to reconstruct the tuple w.r.t. the txn.
43
54
*
@@ -54,6 +65,7 @@ auto CollectUndoLogs(RID rid, const TupleMeta &base_meta, const Tuple &base_tupl
54
65
Transaction *txn, TransactionManager *txn_mgr) -> std::optional<std::vector<UndoLog>> {
55
66
UNIMPLEMENTED (" not implemented" );
56
67
}
68
+
57
69
/* *
58
70
* @brief Generates a new undo log as the transaction tries to modify this tuple at the first time.
59
71
*
@@ -69,6 +81,7 @@ auto GenerateNewUndoLog(const Schema *schema, const Tuple *base_tuple, const Tup
69
81
UndoLink prev_version) -> UndoLog {
70
82
UNIMPLEMENTED (" not implemented" );
71
83
}
84
+
72
85
/* *
73
86
* @brief Generate the updated undo log to replace the old one, whereas the tuple is already modified by this txn once.
74
87
*
@@ -83,6 +96,7 @@ auto GenerateUpdatedUndoLog(const Schema *schema, const Tuple *base_tuple, const
83
96
const UndoLog &log) -> UndoLog {
84
97
UNIMPLEMENTED (" not implemented" );
85
98
}
99
+
86
100
void TxnMgrDbg (const std::string &info, TransactionManager *txn_mgr, const TableInfo *table_info,
87
101
TableHeap *table_heap) {
88
102
// always use stderr for printing logs...
0 commit comments