Recordclass

An immutable snapshot of a record. Updates return a new snapshot; keep the returned record for subsequent changes. Concurrent edits fail with status 409 rather than overwriting data.

object→Record
Namespace
global
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.Services.Database.Record

Methods5

Showing 5 methods

public System.Threading.Tasks.Task Delete()PUBLIC

Delete this revision as its owner or a moderator. A stale revision fails with status 409.

Returns:Task—

public T Deserialize()PUBLIC

Deserialize a JSON payload. Invalid JSON or an incompatible type throws.

Returns:T—

public System.Threading.Tasks.Task`1<Sandbox.Services.Database.Record> MakePrivate()PUBLIC

Allow only you to read your record, preserving its value. Returns a new snapshot with the new revision.

Returns:Task<Record>—

public System.Threading.Tasks.Task`1<Sandbox.Services.Database.Record> MakePublic()PUBLIC

Allow anyone to read your record, preserving its value. Returns a new snapshot with the new revision.

Returns:Task<Record>—

public System.Threading.Tasks.Task`1<Sandbox.Services.Database.Record> Update(string value)PUBLICPER-FRAME

Replace your record's value while preserving its visibility. Returns a new snapshot with the new revision.

ParameterTypeDescription
valuestringThe replacement text, up to 65536 UTF-8 bytes.
Returns:Task<Record>—

Properties9

Showing 9 properties

public System.DateTimeOffset Sandbox.Services.Database.Record.CreatedAt { get; set; }PUBLICGETSET

When this record was created.

Returns:DateTimeOffset—

public string Sandbox.Services.Database.Record.Group { get; set; }PUBLICGETSET

The group containing this record, or null for an ungrouped record.

Returns:string—

public long Sandbox.Services.Database.Record.Id { get; set; }PUBLICGETSET

The stable ID of this record.

Returns:long—

public bool Sandbox.Services.Database.Record.IsPublic { get; set; }PUBLICGETSET

Whether anyone can read this record.

Returns:bool—

public string Sandbox.Services.Database.Record.Key { get; set; }PUBLICGETSET

The record key, unique within its owner's package and table.

Returns:string—

public long Sandbox.Services.Database.Record.OwnerSteamId { get; set; }PUBLICGETSET

The Steam ID of the player who owns this record.

Returns:long—

public string Sandbox.Services.Database.Record.Revision { get; set; }PUBLICGETSET

The revision captured when this snapshot was fetched, used to detect conflicting edits.

Returns:string—

public System.DateTimeOffset Sandbox.Services.Database.Record.UpdatedAt { get; set; }PUBLICGETSETPER-FRAME

When this record was last changed.

Returns:DateTimeOffset—

public string Sandbox.Services.Database.Record.Value { get; set; }PUBLICGETSET

The stored text, which may contain serialized JSON.

Returns:string—

On this page