Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3535622
D3081.id9211.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3081.id9211.diff
View Options
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,42 @@
+#pragma once
+
+#include "Item.h"
+
+#include <memory>
+#include <type_traits>
+
+namespace comm {
+namespace network {
+namespace database {
+
+/**
+ * Database structure:
+ * userPersist
+ * userID string
+ * backupIDs list<string>
+ * recoveryData bytes
+ * backup
+ * id string
+ * compactionID string
+ * encryptedBackupKey bytes
+ * created timestamp
+ * compaction
+ * id string
+ * comapctionHolder string
+ * attachmentHolders list<string>
+ * logs list<string>
+ * log
+ * id 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
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 4:39 PM (12 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2707462
Default Alt Text
D3081.id9211.diff (1 KB)
Attached To
Mode
D3081: [services] Backup - add Database Entities Tools
Attached
Detach File
Event Timeline
Log In to Comment