Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dynablox_opencloud/src/classes/opencloud/StandardDataStore.ts>StandardDataStore

A Roblox OpenCloud API wrapper for Deno and NodeJS written in TypeScript.
Latest
class StandardDataStore
import { StandardDataStore } from "https://deno.land/x/dynablox_opencloud@v0.2.2/src/classes/opencloud/StandardDataStore.ts";

Standard DataStore class for Open Cloud.

Constructors

new
StandardDataStore(
universeId: number,
dataStoreName: string,
scope: string,
type: keyof DataStoreType,
)

Construct a new BaseUniverse

Properties

private
readonly
_client: OpenCloudClient

The client to use services from.

readonly
name: string

The name of the datastore.

readonly
scope: string

The scope of the datastore.

readonly
type: keyof DataStoreType

The type of the DataStore.

readonly
universeId: number

The DataStore universe ID.

Methods

getEntry<Data = unknown, Attributes extends Record<string, unknown> = Record<string, unknown>>(key: string): Promise<DataStoreEntry<Data, Attributes>>

Get the content of a DataStore entry.

getEntryVersion<Data = unknown>(key: string, version: string): Promise<DataStoreEntryVersion<Data>>

Get the content of a DataStore entry by version.

incrementEntry(
key: string,
incrementBy: number,
userIds?: number[],
attributes?: Record<string, unknown>,
): Promise<DataStoreEntryVersionInfo>

Increment the value of an entry in a DataStore.

listAllEntries(
prefix?: string,
limit?: number,
cursor?: string,
): ServicePage<OpenCloudClient["services"]["opencloud"]["DataStoreService"]["listDataStoreEntries"], DataStoreKeyInfo[]>

List all DataStore entries.

listEntries(
prefix?: string,
limit?: number,
cursor?: string,
): ServicePage<OpenCloudClient["services"]["opencloud"]["DataStoreService"]["listDataStoreEntries"], DataStoreKeyInfo[]>

List all DataStore scope entries.

listEntryVersions(
key: string,
limit?: number,
sortOrder?: SortOrderLong,
startTime?: string,
endTime?: string,
cursor?: string,
): ServicePage<OpenCloudClient["services"]["opencloud"]["DataStoreService"]["listDataStoreEntryVersions"], DataStoreEntryVersionInfo[]>

List all DataStore entry versions.

removeEntry(key: string): Promise<void>

Removes an entry from the DataStore.

updateEntry(
key: string,
data: unknown,
userIds?: number[],
attributes?: Record<string, unknown>,
matchKeyVersion?: string,
createOnly?: boolean,
): Promise<DataStoreEntryVersionInfo>

Update the value of an entry in a DataStore.