Skip to content

Commit

Permalink
sync b_plus_tree.h function param
Browse files Browse the repository at this point in the history
  • Loading branch information
unw9527 committed Sep 22, 2024
1 parent e5cf0d3 commit d749a03
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/include/storage/index/b_plus_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include "common/config.h"
#include "common/macros.h"
#include "concurrency/transaction.h"
#include "storage/index/index_iterator.h"
#include "storage/page/b_plus_tree_header_page.h"
#include "storage/page/b_plus_tree_internal_page.h"
Expand Down Expand Up @@ -74,13 +73,13 @@ class BPlusTree {
auto IsEmpty() const -> bool;

// Insert a key-value pair into this B+ tree.
auto Insert(const KeyType &key, const ValueType &value, Transaction *txn = nullptr) -> bool;
auto Insert(const KeyType &key, const ValueType &value) -> bool;

// Remove a key and its value from this B+ tree.
void Remove(const KeyType &key, Transaction *txn);
void Remove(const KeyType &key);

// Return the value associated with a given key
auto GetValue(const KeyType &key, std::vector<ValueType> *result, Transaction *txn = nullptr) -> bool;
auto GetValue(const KeyType &key, std::vector<ValueType> *result) -> bool;

// Return the page id of the root node
auto GetRootPageId() -> page_id_t;
Expand Down Expand Up @@ -112,10 +111,10 @@ class BPlusTree {
auto DrawBPlusTree() -> std::string;

// read data from file and insert one by one
void InsertFromFile(const std::filesystem::path &file_name, Transaction *txn = nullptr);
void InsertFromFile(const std::filesystem::path &file_name);

// read data from file and remove one by one
void RemoveFromFile(const std::filesystem::path &file_name, Transaction *txn = nullptr);
void RemoveFromFile(const std::filesystem::path &file_name);

/**
* @brief Read batch operations from input file, below is a sample file format
Expand All @@ -126,7 +125,7 @@ class BPlusTree {
* (3) (7)
* (1,2) (3,4) (5,6) (7,10,30) // The output tree example
*/
void BatchOpsFromFile(const std::filesystem::path &file_name, Transaction *txn = nullptr);
void BatchOpsFromFile(const std::filesystem::path &file_name);

private:
/* Debug Routines for FREE!! */
Expand Down

0 comments on commit d749a03

Please sign in to comment.