Module |
|
Header |
/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Source/ConcertSyncCore/Public/ConcertDataStore.h |
Include |
#include "ConcertDataStore.h" |
Source |
/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Source/ConcertSyncCore/Private/ConcertDataStore.cpp |
FConcertDataStoreResult Store
(
const FName & Key,
const FName & TypeName,
const FConcertSessionSerializedPayload & SerializedValue,
const TOptional< uint32 > & Version
)
Looks up the specified key, if it doesn't exist yet, adds new key/value pair, else, if the stored value type matches the specified value type, updates the value.
The operation result. The possible result codes are:
EConcertDataStoreResultCode::Added if the key/value was added. The result holds a pointer on the newly added value.
EConcertDataStoreResultCode::Exchanged if the existing key value was updated. The result holds a pointer on the latest stored value.
EConcertDataStoreResultCode::TypeMismatch if the key was already taken but the value types did not match. The result holds a null pointer.
Parameter |
Description |
---|---|
Key |
The value name to store. |
TypeName |
The value type name as returned by TConcertDataStoreType::GetFName(). |
SerializedValue |
The value to store. |
Version |
If set, store the value with the specified version, otherwise, the server will set the version to 1 if the value is inserted or increment it by one if updated. |