Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ set(SOURCE_FILES_unitTest
src/clp/ffi/ir_stream/protocol_constants.hpp
src/clp/ffi/ir_stream/Serializer.cpp
src/clp/ffi/ir_stream/Serializer.hpp
src/clp/ffi/ir_stream/search/NewProjectedSchemaTreeNodeCallbackReq.hpp
src/clp/ffi/ir_stream/utils.cpp
src/clp/ffi/ir_stream/utils.hpp
src/clp/ffi/KeyValuePairLogEvent.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#ifndef CLP_FFI_IR_STREAM_SEARCH_NEWPROJECTEDSCHEMATREENODECALLBACKREQ_HPP
#define CLP_FFI_IR_STREAM_SEARCH_NEWPROJECTEDSCHEMATREENODECALLBACKREQ_HPP

#include <string_view>
#include <type_traits>

#include <outcome/single-header/outcome.hpp>

#include "../../SchemaTree.hpp"

namespace clp::ffi::ir_stream::search {
/**
* Requirements for a callback that's called whenever:
*
* 1. a new schema-tree node is deserialized from the IR stream; and
* 2. that node corresponds to one of the projected key paths in the query.
*
* @tparam NewProjectedSchemaTreeNodeCallbackType
* @param arg_0 Whether the schema-tree node is for an auto-generated kv-pair.
* @param arg_1 The ID of the schema-tree node.
* @param arg_2 The projected key path.
* @return A void result on success or a user-defined error code indicating the failure.
*/
template <typename NewProjectedSchemaTreeNodeCallbackType>
concept NewProjectedSchemaTreeNodeCallbackReq = std::is_invocable_r_v<
outcome_v2::std_result<void>,
NewProjectedSchemaTreeNodeCallbackType,
bool,
SchemaTree::Node::id_t,
std::string_view>;
} // namespace clp::ffi::ir_stream::search

#endif // CLP_FFI_IR_STREAM_SEARCH_NEWPROJECTEDSCHEMATREENODECALLBACKREQ_HPP