Navigation
API > API/Plugins > API/Plugins/ConcertSyncCore > API/Plugins/ConcertSyncCore/FConcertDataStore
References
Module | ConcertSyncCore |
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 FetchOrAdd
&40;
const FName & Key,
const FName & TypeName,
const FConcertSessionSerializedPayload & SerializedValue
&41;
Remarks
Searches the store for the specified key, if not found, adds a new key/value pair, otherwise, if the stored value type matches the initial value type, fetches the stored value. The store always sets the value version to 1 when the value is added. 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::Fetched if the key was already taken and type matched. The result holds a pointer on the fetched value.
- EConcertDataStoreResultCode::TypeMismatch if the key was already taken but the types did not match. The result holds a null pointer.
Parameters
Name | Description |
---|---|
Key | The value name to fetch or add. |
TypeName | The value type name as returned by TConcertDataStoreType::GetFName(). |
SerializedValue | The value to store if the key doesn't already exist. |