-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaced scan_info definition with the range class #129
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5323388
Replaced scan_info definition with the range class
YoshiakiNishimura e8c2287
Merge branch 'master' into move-key-to-scan-info4
YoshiakiNishimura 75b8abf
refactor and rename range to scan_range
YoshiakiNishimura bb0ff5e
rafactor and rename range file to scan_range
YoshiakiNishimura File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2018-2023 Project Tsurugi. | ||
* Copyright 2018-2024 Project Tsurugi. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -18,27 +18,25 @@ | |
namespace jogasaki::executor::process::abstract { | ||
|
||
/** | ||
* @brief scan info | ||
* @details this instance provides specification of scan (e.g. definition of the range of scanned records) | ||
* @brief range | ||
* @details definition of the range of scanned records | ||
*/ | ||
class scan_info { | ||
public: | ||
class range { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 趣味の問題に近いですが、rangeという単純名だとstd::rangeみたいなものもあるので、scan_rangeあたりにしませんか?rangeだと一般名で検索でヒットしすぎるので少しだけ修飾したいという思いです。 |
||
public: | ||
/** | ||
* @brief create empty object | ||
*/ | ||
scan_info() = default; | ||
range() = default; | ||
|
||
/** | ||
* @brief destroy the object | ||
*/ | ||
virtual ~scan_info() = default; | ||
virtual ~range() = default; | ||
|
||
scan_info(scan_info const& other) = default; | ||
scan_info& operator=(scan_info const& other) = default; | ||
scan_info(scan_info&& other) noexcept = default; | ||
scan_info& operator=(scan_info&& other) noexcept = default; | ||
range(range const& other) = default; | ||
range& operator=(range const& other) = default; | ||
range(range&& other) noexcept = default; | ||
range& operator=(range&& other) noexcept = default; | ||
}; | ||
|
||
} | ||
|
||
|
||
} // namespace jogasaki::executor::process::abstract |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2018-2024 Project Tsurugi. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#include "bound.h" | ||
|
||
namespace jogasaki::executor::process::impl { | ||
|
||
[[nodiscard]] std::string_view bound::key() const noexcept { | ||
return {static_cast<char*>(key_->data()), len_}; | ||
} | ||
[[nodiscard]] kvs::end_point_kind bound::endpointkind() const noexcept { return endpointkind_; } | ||
void bound::dump(std::ostream& out, int indent) const noexcept { | ||
std::string indent_space(indent, ' '); | ||
out << indent_space << "bound:" | ||
<< "\n"; | ||
out << indent_space << " endpointkind_: " << endpointkind_ << "\n"; | ||
out << indent_space << " len_: " << len_ << "\n"; | ||
out << indent_space << " key_: " << *key_ << "\n"; | ||
key_->dump(out, indent + 2); | ||
} | ||
} // namespace jogasaki::executor::process::impl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2018-2024 Project Tsurugi. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#pragma once | ||
|
||
#include <jogasaki/data/aligned_buffer.h> | ||
#include <jogasaki/kvs/storage.h> | ||
|
||
namespace jogasaki::executor::process::impl { | ||
|
||
class bound { | ||
|
||
public: | ||
bound() = default; | ||
bound(bound const& other) = delete; | ||
bound& operator=(bound const& other) = delete; | ||
bound(bound&& other) noexcept = default; | ||
bound& operator=(bound&& other) noexcept = default; | ||
~bound() = default; | ||
bound(kvs::end_point_kind endpointkind, std::size_t len, | ||
std::unique_ptr<data::aligned_buffer> key) | ||
: endpointkind_(endpointkind), len_(len), key_(std::move(key)) {} | ||
kvs::end_point_kind endpointkind() { return endpointkind_; }; | ||
std::unique_ptr<data::aligned_buffer> key() { return std::move(key_); }; | ||
[[nodiscard]] std::string_view key() const noexcept; | ||
[[nodiscard]] kvs::end_point_kind endpointkind() const noexcept; | ||
/** | ||
* @brief Support for debugging, callable in GDB | ||
* @param out The output stream to which the buffer's internal state will be written. | ||
* @param indent The indentation level for formatting the output, default is 0. | ||
*/ | ||
void dump(std::ostream& out, int indent = 0) const noexcept; | ||
|
||
private: | ||
kvs::end_point_kind endpointkind_{}; | ||
std::size_t len_{}; | ||
std::unique_ptr<data::aligned_buffer> key_{}; | ||
}; | ||
|
||
} // namespace jogasaki::executor::process::impl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここも空行を維持でお願いします。