Class GameSaveRecordMapping
Inheritance
GameSaveRecordMapping
Assembly: Serenity.GameSave.Infrastructure.dll
Syntax
public static class GameSaveRecordMapping
Fields
CompletionPercentField
Declaration
public const string CompletionPercentField = "completion_percent"
Field Value
DefaultTableName
The default table or collection name used when the settings leave it blank.
Declaration
public const string DefaultTableName = "serenity_game_save"
Field Value
GlobalPartitionValue
The single partition value every game-save row is stored under.
Declaration
public const string GlobalPartitionValue = "global"
Field Value
KeyFieldsPartitionAndSlot
Declaration
public static readonly IReadOnlyList<string> KeyFieldsPartitionAndSlot
Field Value
LabelField
Field name storing Label.
Declaration
public const string LabelField = "label"
Field Value
PartitionField
Field name partitioning every game-save row (see the type remarks for why this is a single shared value rather than the slot index).
Declaration
public const string PartitionField = "partition"
Field Value
PayloadField
Field name storing every registered section's serialized JSON, keyed by section key.
Declaration
public const string PayloadField = "payload"
Field Value
PlaytimeSecondsField
Declaration
public const string PlaytimeSecondsField = "playtime_seconds"
Field Value
SavedAtTicksField
Declaration
public const string SavedAtTicksField = "saved_at_ticks"
Field Value
SlotIndexField
Field name storing the zero-based slot index a row belongs to.
Declaration
public const string SlotIndexField = "slot_index"
Field Value
Methods
BuildPartitionScopeFilters()
Builds the partition = "global" scope filter shared by every cross-slot operation (e.g. listing summaries).
Declaration
public static IReadOnlyList<FieldFilter> BuildPartitionScopeFilters()
Returns
BuildSchema(StoreTable)
Builds the game-save table schema: fields and the partition/slot index.
Declaration
public static StructuredTableSchema BuildSchema(StoreTable table)
Parameters
Returns
BuildSlotScopeFilters(SaveSlotId)
Builds the partition = "global" AND slot_index = slotId scope filter shared by every single-slot operation.
Declaration
public static IReadOnlyList<FieldFilter> BuildSlotScopeFilters(SaveSlotId slotId)
Parameters
Returns
ToDocument(StructuredRecord)
Declaration
public static SaveDocument ToDocument(StructuredRecord record)
Parameters
Returns
ToRecord(SaveSlotId, SaveDocument)
Declaration
public static StructuredRecord ToRecord(SaveSlotId slotId, SaveDocument document)
Parameters
Returns
ToSummary(StructuredRecord)
Declaration
public static SaveSlotSummary ToSummary(StructuredRecord record)
Parameters
Returns