Tableclass
A database table. Operations always fetch current data and never cache records.
Methods5
Showing 5 methods
public System.Threading.Tasks.Task`1<Sandbox.Services.Database.Record> Create(string key, string value, string group = null, bool isPublic = False)
Create a record without overwriting an existing key (status 409 on duplicate). Keys and optional immutable group keys are case-sensitive, up to 128 characters. Records are private by default. Public records can be read by anyone; only the owner can update them.
| Parameter | Type | Description |
|---|---|---|
| key | string | A key unique within your package and table, up to 128 characters, regardless of group. |
| value | string | The text to store, up to 65536 UTF-8 bytes. |
| group = null | string | An optional immutable group label, up to 128 characters. |
| isPublic = False | bool | Whether other players can read this record. Defaults to false. |
public System.Threading.Tasks.Task`1<Sandbox.Services.Database.Record> Get(long id)
Read a public record or one owned by the signed-in player. Missing or inaccessible records fail with status 404.
| Parameter | Type | Description |
|---|---|---|
| id | long | The stable ID of the record to read. |
public System.Threading.Tasks.Task`1<System.Collections.Generic.IReadOnlyDictionary`2<string,Sandbox.Services.Database.GroupInfo>> GetPublicGroupInfo(string[] groups)
Get public record counts and creation-time ranges for up to 100 group keys. Empty groups are included with a zero count and null dates; duplicate keys appear once.
| Parameter | Type | Description |
|---|---|---|
| groups | string[] | One to 100 group labels. Duplicate labels are counted once. |
public System.Threading.Tasks.Task`1<Sandbox.Services.Database.Page> List(string group = null, long cursor = 0, int pageSize = 20)
Get public records in one group. A null group selects ungrouped records, not every group. Page size must be 1–100. Pass NextCursor as cursor with the same group to get the next page.
| Parameter | Type | Description |
|---|---|---|
| group = null | string | The group to list. Null selects only ungrouped records. |
| cursor = 0 | long | The previous page’s NextCursor, or zero for the first page. |
| pageSize = 20 | int | The maximum number of records to return, from 1 to 100. |
public System.Threading.Tasks.Task`1<Sandbox.Services.Database.Page> ListOwned(string group = null, long cursor = 0, int pageSize = 20)
Get your records in one group, including private records. A null group selects ungrouped records. Page size must be 1–100. Pass NextCursor as cursor with the same group to get the next page.
| Parameter | Type | Description |
|---|---|---|
| group = null | string | The group to list. Null selects only ungrouped records. |
| cursor = 0 | long | The previous page’s NextCursor, or zero for the first page. |
| pageSize = 20 | int | The maximum number of records to return, from 1 to 100. |
No results match this filter.
Properties2
Showing 2 properties
No results match this filter.