FConcertDataStore::FetchOrAdd

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.

Windows
MacOS
Linux

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

Syntax

FConcertDataStoreResult FetchOrAdd
(
    const FName & Key,
    const FName & TypeName,
    const FConcertSessionSerializedPayload & SerializedValue
)

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.

Returns

The operation result. The possible result codes are:

Parameters

Parameter

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.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss