Roblox UtilitiesDevlHub Roblox Documentation

Class

OrderedDataStore

NotCreatableNotReplicated
Memory category
Instances

A GlobalDataStore that also allows for ordered data store entries.

A OrderedDataStore is essentially a GlobalDataStore with the exception that stored values must be integers. It exposes a method GetSortedAsync() which allows inspection of the entries in sorted order using a DataStorePages object.

Ordered data stores do not support versioning and metadata, so DataStoreKeyInfo is always nil for keys in an OrderedDataStore. If you need versioning and metadata support, use a DataStore.

Ordered data stores do not support the optional userIds parameter for SetAsync() or IncrementAsync().

See Data stores for an overview on how to use ordered data stores.

Methods 1#

GetSortedAsyncReturns a DataStorePages object.Yields

GetSortedAsync(ascending: boolean, pagesize: int, minValue: Variant, maxValue: Variant): DataStorePages#

Yields

Returns a DataStorePages object. The sort order is determined by ascending, the length of each page by pageSize, and minValue/maxValue are optional parameters which filter the results.

See Error codes and limits for request limits and descriptions of the error codes.

NameTypeDefaultDescription
ascendingbooleanA boolean indicating whether the returned data pages are in ascending order.
pagesizeintThe length of each page. By default is 50. The max allowed value is 100.
minValueVariantOptional parameter. If set, data pages with a value less than minValue will be excluded.
maxValueVariantOptional parameter. If set, data pages with a value greater than maxValue will be excluded.
Returns

Inherited members#

Inherited from GlobalDataStore 7
Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed