Skip to content

Commit c91e1cf

Browse files
charleskimbacaetterjulia-rbx
authored
datastore clarity/typo fixes (#1179)
## Changes Clarity/typo fixes. ## Checks By submitting your pull request for review, you agree to the following: - [x] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [x] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [x] To the best of my knowledge, all proposed changes are accurate. --------- Co-authored-by: Andrew Etter <[email protected]> Co-authored-by: julia <[email protected]>
1 parent c255323 commit c91e1cf

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

content/en-us/cloud-services/data-stores/versioning-listing-and-caching.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ You can specify a prefix when listing all data stores or keys, and get back only
123123
For new experiences, use [listing and prefixes](#listing-and-prefixes) to organize keys in your data store instead of the legacy scopes feature. For existing experiences that use scopes, continue using them.
124124
</Alert>
125125

126-
Every key in a data store has a default global scope. You can organize keys further by setting a unique string as a scope for the second parameter of `Class.DataStoreService:GetDataStore()|GetDataStore()`. This automatically attaches the scope to the beginning of all keys in all operations done on the data store.
126+
You can organize keys in a data store further by setting a unique string as a scope for the second parameter of `Class.DataStoreService:GetDataStore()|GetDataStore()`. The default scope (if no scope is given) is `global`. The scope is automatically prepended to the beginning of all keys in all operations done on the data store.
127127

128128
<table>
129129
<thead>
@@ -148,7 +148,7 @@ Every key in a data store has a default global scope. You can organize keys furt
148148
</tbody>
149149
</table>
150150

151-
The combination of data store name, scope, and key uniquely identifies a key. All three values are required to identify a key with a scope. For example, you can read a global key named `User_1234` as:
151+
The combination of data store name, scope, and key uniquely identifies a key. All three values are required to identify a key with a scope. For example, you can read a `global`-scoped key named `User_1234` as:
152152

153153
```lua
154154
local DataStoreService = game:GetService("DataStoreService")
@@ -158,7 +158,7 @@ local success, currentGold = pcall(function()
158158
end)
159159
```
160160

161-
If the key `User_1234` has a scope of gold, though, you can only read it as:
161+
If the key `User_1234` has a scope of `gold`, though, you can only read it as:
162162

163163
```lua
164164
local DataStoreService = game:GetService("DataStoreService")
@@ -184,7 +184,7 @@ local ds = DataStoreService:GetDataStore("DS1", "", options)
184184
```
185185

186186
<Alert severity="info">
187-
When you use the `Class.DataStoreOptions.AllScopes|AllScopes` property, `Class.DataStore:ListKeysAsync()|ListKeysAsync()` returns every key with their scope as the prefix argument, such as `global/player_data_1234` or `houses/house3`. The default scope is `global`.
187+
When you use the `Class.DataStoreOptions.AllScopes|AllScopes` property, `Class.DataStore:ListKeysAsync()|ListKeysAsync()` returns every key with their scope as the prefix argument, such as `global/player_data_1234` or `houses/house3`. Remember that the default scope is `global`.
188188
</Alert>
189189

190190
If you enable the `Class.DataStoreOptions.AllScopes|AllScopes` property and create a new key in the data store, you must always specify a scope for that key in the format of scope/keyname. If you don't, the APIs throw an error. For example, `gold/player_34545` is acceptable with gold as the scope, but `player_34545` leads to an error.

content/en-us/reference/engine/classes/DataStoreService.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ methods:
7979
`Class.DataStoreService:GetDataStore()|GetDataStore()` function.
8080
8181
Note that the `Class.DataStore` returned by this function always uses the
82-
scope `u`. See [Data stores](../../../cloud-services/data-stores/index.md)
82+
scope `u`. See
83+
[Versioning, listing, and caching](../../../cloud-services/data-stores/versioning-listing-and-caching.md#scopes)
8384
for details on scope.
8485
code_samples:
8586
- get-a-globaldatastore-instance

content/en-us/reference/engine/classes/OrderedDataStore.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,20 @@ memory_category: Instances
88
summary: |
99
A GlobalDataStore that also allows for ordered data store entries.
1010
description: |
11-
A **OrderedDataStore** is essentially a `Class.GlobalDataStore` with the
12-
exception that stored values must be **positive integers**. It exposes a
13-
method `Class.OrderedDataStore:GetSortedAsync()|GetSortedAsync()` which allows
14-
inspection of the entries in sorted order using a `Class.DataStorePages`
15-
object.
11+
An **OrderedDataStore** is essentially a `Class.GlobalDataStore` with stored values that are **integers**.
12+
It exposes the `Class.OrderedDataStore:GetSortedAsync()|GetSortedAsync()` method, which allows for the
13+
inspection of entries in sorted order using a `Class.DataStorePages` object.
1614
1715
Ordered data stores do not support versioning and metadata, so
1816
`Class.DataStoreKeyInfo` is always `nil` for keys in an
1917
`Class.OrderedDataStore`. If you need versioning and metadata support, use a
2018
`Class.DataStore`.
2119
22-
Ordered data stores do not support the optional `userIds` parameter for
20+
Ordered data stores also do not support the optional `userIds` parameter for
2321
`Class.OrderedDataStore:SetAsync()|SetAsync()` or
2422
`Class.OrderedDataStore:IncrementAsync()|IncrementAsync()`.
2523
26-
See [Data Stores](../../../cloud-services/data-stores/index.md) for an
24+
See [Data stores](../../../cloud-services/data-stores/index.md) for an
2725
overview on using ordered data stores.
2826
code_samples:
2927
- OrderedDataStore-Basics
@@ -44,7 +42,7 @@ methods:
4442
**minValue**/**maxValue** are optional parameters which filter the
4543
results.
4644
47-
See [Data Stores](../../../cloud-services/data-stores/index.md) for
45+
See [Error codes and limits](../../../cloud-services/data-stores/error-codes-and-limits.md) for
4846
request limits and descriptions of the error codes.
4947
code_samples: []
5048
parameters:

0 commit comments

Comments
 (0)