From 751cdc6c0235a0623ed980b24b71acb85e94dacf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 20 Feb 2020 21:22:03 +0100 Subject: UUID record item type --- include/erebos/storage.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include') diff --git a/include/erebos/storage.h b/include/erebos/storage.h index 5812783..0859dc8 100644 --- a/include/erebos/storage.h +++ b/include/erebos/storage.h @@ -9,6 +9,8 @@ #include #include +#include + namespace erebos { class Storage; @@ -154,6 +156,17 @@ protected: Ref(const std::shared_ptr p): PartialRef(p) {} }; +struct UUID +{ + explicit UUID(std::string); + explicit operator std::string() const; + + bool operator==(const UUID &) const; + bool operator!=(const UUID &) const; + + uuid_t uuid; +}; + template class RecordT { @@ -171,6 +184,7 @@ public: int, std::string, std::vector, + UUID, typename S::Ref, UnknownType> Variant; @@ -190,6 +204,7 @@ public: std::optional asInteger() const; std::optional asText() const; std::optional> asBinary() const; + std::optional asUUID() const; std::optional asRef() const; std::optional asUnknown() const; -- cgit v1.2.3