/
OrderedDataStore.yaml
79 lines (76 loc) · 2.45 KB
/
OrderedDataStore.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: OrderedDataStore
type: class
category: Data
memory_category: Instances
summary: |
A GlobalDataStore that also allows for ordered data store entries.
description: |
A **OrderedDataStore** is essentially a `Class.GlobalDataStore` with the
exception that stored values must be **positive integers**. It exposes a
method `Class.OrderedDataStore:GetSortedAsync()|GetSortedAsync()` which allows
inspection of the entries in sorted order using a `Class.DataStorePages`
object.
Ordered data stores do not support versioning and metadata, so
`Class.DataStoreKeyInfo` is always `nil` for keys in an
`Class.OrderedDataStore`. If you need versioning and metadata support, use a
`Class.DataStore`.
See [Data Stores](../../../cloud-services/datastores.md) for an overview on
using ordered data stores.
code_samples:
- OrderedDataStore-Basics
inherits:
- GlobalDataStore
tags:
- NotCreatable
- NotReplicated
deprecation_message: ''
properties: []
methods:
- name: OrderedDataStore:GetSortedAsync
summary: |
Returns a `Class.DataStorePages` object.
description: |
Returns a `Class.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 [Data Stores](../../../cloud-services/datastores.md) for request
limits and descriptions of the error codes.
code_samples:
parameters:
- name: ascending
type: bool
default:
summary: |
A boolean indicating whether the returned data pages are in ascending
order.
- name: pagesize
type: int
default:
summary: |
The length of each page. By default is 50. The max allowed value
is 100.
- name: minValue
type: Variant
default:
summary: |
Optional parameter. If set, data pages with a value less than
**minValue** will be excluded.
- name: maxValue
type: Variant
default:
summary: |
Optional parameter. If set, data pages with a value greater than
**maxValue** will be excluded.
returns:
- type: Instance
summary: |
A sorted `Class.DataStorePages` object based on the provided
arguments.
tags:
- Yields
deprecation_message: ''
security: None
thread_safety: Unsafe
events: []
callbacks: []