Page MenuHomePhabricator

D3081.id9364.diff
No OneTemporary

D3081.id9364.diff

diff --git a/services/backup/docker-server/contents/server/src/DatabaseEntities/DatabaseEntitiesTools.h b/services/backup/docker-server/contents/server/src/DatabaseEntities/DatabaseEntitiesTools.h
new file mode 100644
--- /dev/null
+++ b/services/backup/docker-server/contents/server/src/DatabaseEntities/DatabaseEntitiesTools.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "Item.h"
+
+#include <memory>
+#include <type_traits>
+
+namespace comm {
+namespace network {
+namespace database {
+
+/**
+ * Database - Structure:
+ * backup
+ * userID[PK] string
+ * created[SK] timestamp
+ * backupID string
+ * recoveryData bytes
+ * encryptedBackupKey bytes
+ * compactionHolder string
+ * attachmentHolders list<string>
+ * log
+ * backupID[PK] string
+ * logID[SK] string
+ * persistedInBlob bool
+ * value bytes
+ * attachmentHolders list<string>
+ */
+
+template <typename T> std::shared_ptr<T> createItemByType() {
+ static_assert(std::is_base_of<Item, T>::value, "T must inherit from Item");
+ return std::make_shared<T>();
+}
+
+} // namespace database
+} // namespace network
+} // namespace comm

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 4:27 PM (12 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2707451
Default Alt Text
D3081.id9364.diff (1 KB)

Event Timeline