Page MenuHomePhabricator

D4013.id12622.diff
No OneTemporary

D4013.id12622.diff

diff --git a/services/backup/src/DatabaseEntities/BackupItem.h b/services/backup/src/DatabaseEntities/BackupItem.h
--- a/services/backup/src/DatabaseEntities/BackupItem.h
+++ b/services/backup/src/DatabaseEntities/BackupItem.h
@@ -64,7 +64,7 @@
void assignItemFromDatabase(const AttributeValues &itemFromDB) override;
std::string getTableName() const override;
- PrimaryKey getPrimaryKey() const override;
+ PrimaryKeyDescriptor getPrimaryKeyDescriptor() const override;
PrimaryKeyValue getPrimaryKeyValue() const override;
std::string getUserID() const;
diff --git a/services/backup/src/DatabaseEntities/BackupItem.cpp b/services/backup/src/DatabaseEntities/BackupItem.cpp
--- a/services/backup/src/DatabaseEntities/BackupItem.cpp
+++ b/services/backup/src/DatabaseEntities/BackupItem.cpp
@@ -78,8 +78,8 @@
return BackupItem::tableName;
}
-PrimaryKey BackupItem::getPrimaryKey() const {
- return PrimaryKey(BackupItem::FIELD_USER_ID, BackupItem::FIELD_BACKUP_ID);
+PrimaryKeyDescriptor BackupItem::getPrimaryKeyDescriptor() const {
+ return PrimaryKeyDescriptor(BackupItem::FIELD_USER_ID, BackupItem::FIELD_BACKUP_ID);
}
PrimaryKeyValue BackupItem::getPrimaryKeyValue() const {
diff --git a/services/backup/src/DatabaseEntities/LogItem.h b/services/backup/src/DatabaseEntities/LogItem.h
--- a/services/backup/src/DatabaseEntities/LogItem.h
+++ b/services/backup/src/DatabaseEntities/LogItem.h
@@ -48,7 +48,7 @@
void assignItemFromDatabase(const AttributeValues &itemFromDB) override;
std::string getTableName() const override;
- PrimaryKey getPrimaryKey() const override;
+ PrimaryKeyDescriptor getPrimaryKeyDescriptor() const override;
PrimaryKeyValue getPrimaryKeyValue() const override;
std::string getBackupID() const;
diff --git a/services/backup/src/DatabaseEntities/LogItem.cpp b/services/backup/src/DatabaseEntities/LogItem.cpp
--- a/services/backup/src/DatabaseEntities/LogItem.cpp
+++ b/services/backup/src/DatabaseEntities/LogItem.cpp
@@ -76,8 +76,8 @@
return LogItem::tableName;
}
-PrimaryKey LogItem::getPrimaryKey() const {
- return PrimaryKey(LogItem::FIELD_BACKUP_ID, LogItem::FIELD_LOG_ID);
+PrimaryKeyDescriptor LogItem::getPrimaryKeyDescriptor() const {
+ return PrimaryKeyDescriptor(LogItem::FIELD_BACKUP_ID, LogItem::FIELD_LOG_ID);
}
PrimaryKeyValue LogItem::getPrimaryKeyValue() const {
diff --git a/services/blob/src/DatabaseEntities/BlobItem.h b/services/blob/src/DatabaseEntities/BlobItem.h
--- a/services/blob/src/DatabaseEntities/BlobItem.h
+++ b/services/blob/src/DatabaseEntities/BlobItem.h
@@ -34,7 +34,7 @@
void assignItemFromDatabase(const AttributeValues &itemFromDB) override;
std::string getTableName() const override;
- PrimaryKey getPrimaryKey() const override;
+ PrimaryKeyDescriptor getPrimaryKeyDescriptor() const override;
PrimaryKeyValue getPrimaryKeyValue() const override;
std::string getBlobHash() const;
diff --git a/services/blob/src/DatabaseEntities/BlobItem.cpp b/services/blob/src/DatabaseEntities/BlobItem.cpp
--- a/services/blob/src/DatabaseEntities/BlobItem.cpp
+++ b/services/blob/src/DatabaseEntities/BlobItem.cpp
@@ -48,8 +48,8 @@
return BlobItem::tableName;
}
-PrimaryKey BlobItem::getPrimaryKey() const {
- return PrimaryKey(BlobItem::FIELD_BLOB_HASH);
+PrimaryKeyDescriptor BlobItem::getPrimaryKeyDescriptor() const {
+ return PrimaryKeyDescriptor(BlobItem::FIELD_BLOB_HASH);
}
PrimaryKeyValue BlobItem::getPrimaryKeyValue() const {
diff --git a/services/blob/src/DatabaseEntities/ReverseIndexItem.h b/services/blob/src/DatabaseEntities/ReverseIndexItem.h
--- a/services/blob/src/DatabaseEntities/ReverseIndexItem.h
+++ b/services/blob/src/DatabaseEntities/ReverseIndexItem.h
@@ -33,7 +33,7 @@
void assignItemFromDatabase(const AttributeValues &itemFromDB) override;
std::string getTableName() const override;
- PrimaryKey getPrimaryKey() const override;
+ PrimaryKeyDescriptor getPrimaryKeyDescriptor() const override;
PrimaryKeyValue getPrimaryKeyValue() const override;
std::string getHolder() const;
diff --git a/services/blob/src/DatabaseEntities/ReverseIndexItem.cpp b/services/blob/src/DatabaseEntities/ReverseIndexItem.cpp
--- a/services/blob/src/DatabaseEntities/ReverseIndexItem.cpp
+++ b/services/blob/src/DatabaseEntities/ReverseIndexItem.cpp
@@ -41,8 +41,8 @@
return ReverseIndexItem::tableName;
}
-PrimaryKey ReverseIndexItem::getPrimaryKey() const {
- return PrimaryKey(ReverseIndexItem::FIELD_HOLDER);
+PrimaryKeyDescriptor ReverseIndexItem::getPrimaryKeyDescriptor() const {
+ return PrimaryKeyDescriptor(ReverseIndexItem::FIELD_HOLDER);
}
PrimaryKeyValue ReverseIndexItem::getPrimaryKeyValue() const {
diff --git a/services/lib/src/DatabaseManagerBase.cpp b/services/lib/src/DatabaseManagerBase.cpp
--- a/services/lib/src/DatabaseManagerBase.cpp
+++ b/services/lib/src/DatabaseManagerBase.cpp
@@ -24,7 +24,7 @@
void DatabaseManagerBase::innerRemoveItem(const Item &item) {
Aws::DynamoDB::Model::DeleteItemRequest request;
request.SetTableName(item.getTableName());
- PrimaryKey pk = item.getPrimaryKey();
+ PrimaryKeyDescriptor pk = item.getPrimaryKeyDescriptor();
PrimaryKeyValue primaryKeyValue = item.getPrimaryKeyValue();
request.AddKey(
pk.partitionKey,
diff --git a/services/lib/src/Item.h b/services/lib/src/Item.h
--- a/services/lib/src/Item.h
+++ b/services/lib/src/Item.h
@@ -26,7 +26,7 @@
std::unique_ptr<std::string> sortKey;
};
-struct PrimaryKey : PrimaryKeyBase {
+struct PrimaryKeyDescriptor : PrimaryKeyBase {
using PrimaryKeyBase::PrimaryKeyBase;
};
@@ -39,7 +39,7 @@
public:
virtual std::string getTableName() const = 0;
- virtual PrimaryKey getPrimaryKey() const = 0;
+ virtual PrimaryKeyDescriptor getPrimaryKeyDescriptor() const = 0;
virtual PrimaryKeyValue getPrimaryKeyValue() const = 0;
virtual void assignItemFromDatabase(const AttributeValues &itemFromDB) = 0;
};
diff --git a/services/tunnelbroker/src/Database/DeviceSessionItem.h b/services/tunnelbroker/src/Database/DeviceSessionItem.h
--- a/services/tunnelbroker/src/Database/DeviceSessionItem.h
+++ b/services/tunnelbroker/src/Database/DeviceSessionItem.h
@@ -31,7 +31,7 @@
static const std::string FIELD_CHECKPOINT_TIME;
static const std::string FIELD_EXPIRE;
- PrimaryKey getPrimaryKey() const override;
+ PrimaryKeyDescriptor getPrimaryKeyDescriptor() const override;
PrimaryKeyValue getPrimaryKeyValue() const override;
std::string getTableName() const override;
std::string getSessionID() const;
diff --git a/services/tunnelbroker/src/Database/DeviceSessionItem.cpp b/services/tunnelbroker/src/Database/DeviceSessionItem.cpp
--- a/services/tunnelbroker/src/Database/DeviceSessionItem.cpp
+++ b/services/tunnelbroker/src/Database/DeviceSessionItem.cpp
@@ -83,8 +83,8 @@
config::ConfigManager::OPTION_DYNAMODB_SESSIONS_TABLE);
}
-PrimaryKey DeviceSessionItem::getPrimaryKey() const {
- return PrimaryKey(DeviceSessionItem::FIELD_SESSION_ID);
+PrimaryKeyDescriptor DeviceSessionItem::getPrimaryKeyDescriptor() const {
+ return PrimaryKeyDescriptor(DeviceSessionItem::FIELD_SESSION_ID);
}
PrimaryKeyValue DeviceSessionItem::getPrimaryKeyValue() const {
diff --git a/services/tunnelbroker/src/Database/MessageItem.h b/services/tunnelbroker/src/Database/MessageItem.h
--- a/services/tunnelbroker/src/Database/MessageItem.h
+++ b/services/tunnelbroker/src/Database/MessageItem.h
@@ -29,7 +29,7 @@
static const std::string FIELD_CREATED_AT;
static const std::string INDEX_TO_DEVICE_ID;
- PrimaryKey getPrimaryKey() const override;
+ PrimaryKeyDescriptor getPrimaryKeyDescriptor() const override;
PrimaryKeyValue getPrimaryKeyValue() const override;
std::string getTableName() const override;
std::string getMessageID() const;
diff --git a/services/tunnelbroker/src/Database/MessageItem.cpp b/services/tunnelbroker/src/Database/MessageItem.cpp
--- a/services/tunnelbroker/src/Database/MessageItem.cpp
+++ b/services/tunnelbroker/src/Database/MessageItem.cpp
@@ -68,8 +68,8 @@
config::ConfigManager::OPTION_DYNAMODB_MESSAGES_TABLE);
}
-PrimaryKey MessageItem::getPrimaryKey() const {
- return PrimaryKey(MessageItem::FIELD_MESSAGE_ID);
+PrimaryKeyDescriptor MessageItem::getPrimaryKeyDescriptor() const {
+ return PrimaryKeyDescriptor(MessageItem::FIELD_MESSAGE_ID);
}
PrimaryKeyValue MessageItem::getPrimaryKeyValue() const {
diff --git a/services/tunnelbroker/src/Database/PublicKeyItem.h b/services/tunnelbroker/src/Database/PublicKeyItem.h
--- a/services/tunnelbroker/src/Database/PublicKeyItem.h
+++ b/services/tunnelbroker/src/Database/PublicKeyItem.h
@@ -18,7 +18,7 @@
static const std::string FIELD_DEVICE_ID;
static const std::string FIELD_PUBLIC_KEY;
- PrimaryKey getPrimaryKey() const override;
+ PrimaryKeyDescriptor getPrimaryKeyDescriptor() const override;
PrimaryKeyValue getPrimaryKeyValue() const override;
std::string getTableName() const override;
std::string getDeviceID() const;
diff --git a/services/tunnelbroker/src/Database/PublicKeyItem.cpp b/services/tunnelbroker/src/Database/PublicKeyItem.cpp
--- a/services/tunnelbroker/src/Database/PublicKeyItem.cpp
+++ b/services/tunnelbroker/src/Database/PublicKeyItem.cpp
@@ -43,8 +43,8 @@
config::ConfigManager::OPTION_DYNAMODB_SESSIONS_PUBLIC_KEY_TABLE);
}
-PrimaryKey PublicKeyItem::getPrimaryKey() const {
- return PrimaryKey(PublicKeyItem::FIELD_DEVICE_ID);
+PrimaryKeyDescriptor PublicKeyItem::getPrimaryKeyDescriptor() const {
+ return PrimaryKeyDescriptor(PublicKeyItem::FIELD_DEVICE_ID);
}
PrimaryKeyValue PublicKeyItem::getPrimaryKeyValue() const {
diff --git a/services/tunnelbroker/src/Database/SessionSignItem.h b/services/tunnelbroker/src/Database/SessionSignItem.h
--- a/services/tunnelbroker/src/Database/SessionSignItem.h
+++ b/services/tunnelbroker/src/Database/SessionSignItem.h
@@ -19,7 +19,7 @@
static const std::string FIELD_DEVICE_ID;
static const std::string FIELD_EXPIRE;
- PrimaryKey getPrimaryKey() const override;
+ PrimaryKeyDescriptor getPrimaryKeyDescriptor() const override;
PrimaryKeyValue getPrimaryKeyValue() const override;
std::string getTableName() const override;
std::string getSign() const;
diff --git a/services/tunnelbroker/src/Database/SessionSignItem.cpp b/services/tunnelbroker/src/Database/SessionSignItem.cpp
--- a/services/tunnelbroker/src/Database/SessionSignItem.cpp
+++ b/services/tunnelbroker/src/Database/SessionSignItem.cpp
@@ -47,8 +47,8 @@
config::ConfigManager::OPTION_DYNAMODB_SESSIONS_VERIFICATION_TABLE);
}
-PrimaryKey SessionSignItem::getPrimaryKey() const {
- return PrimaryKey(SessionSignItem::FIELD_DEVICE_ID);
+PrimaryKeyDescriptor SessionSignItem::getPrimaryKeyDescriptor() const {
+ return PrimaryKeyDescriptor(SessionSignItem::FIELD_DEVICE_ID);
}
PrimaryKeyValue SessionSignItem::getPrimaryKeyValue() const {

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 5:31 AM (11 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2703967
Default Alt Text
D4013.id12622.diff (10 KB)

Event Timeline