summaryrefslogtreecommitdiffstats
path: root/include/framework
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2023-07-17 16:05:04 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2023-07-17 16:05:04 -0400
commit72bdba182d24ec8fd93d1d2b9bbe54aa57ff0e5d (patch)
treecdba8aa3a563fa2ddd0e52201c5f9319456d6125 /include/framework
parent99d957ea185c3641e407b73a757bc9e2b5673686 (diff)
downloaddynamic-extension-72bdba182d24ec8fd93d1d2b9bbe54aa57ff0e5d.tar.gz
PriorityQueue: generalized priority queue comparison operation
Generalized the comparison used for the priority queue to enable its use within the KNN query code.
Diffstat (limited to 'include/framework')
-rw-r--r--include/framework/RecordInterface.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/framework/RecordInterface.h b/include/framework/RecordInterface.h
index a3f6814..8d40590 100644
--- a/include/framework/RecordInterface.h
+++ b/include/framework/RecordInterface.h
@@ -40,6 +40,17 @@ concept KVPInterface = RecordInterface<R> && requires(R r) {
r.value;
};
+template<typename R>
+concept WrappedInterface = RecordInterface<R> && requires(R r, R s, bool b) {
+ {r.header} -> std::convertible_to<uint32_t>;
+ r.rec;
+ {r.set_delete()};
+ {r.is_deleted()} -> std::convertible_to<bool>;
+ {r.set_tombstone(b)};
+ {r.is_tombstone()} -> std::convertible_to<bool>;
+ {r < s} -> std::convertible_to<bool>;
+};
+
template<RecordInterface R>
struct Wrapped {
uint32_t header;