ListVersionsAsync
This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts.
For thread safety, this property is not safe to read in an unsynchronized thread.
This function enumerates versions of the specified key in either ascending or descending order specified by a Enum/SortDirection
parameter. It can optionally filter the returned versions by minimum and maximum timestamp.
See Also
Articles/Data store|Data Stores
, an in-depth guide on data structure, management, error handling, and more.
Parameters
Name | Type | Default | Description |
---|---|---|---|
|
Key name for the versions to list. If |
||
Ascending
|
Enum specifying ascending or descending sort order. |
||
0
|
Date after which the versions should be listed. |
||
0
|
Date up to which the versions should be listed. |
||
0
|
Number of items to be returned in each page. |
Returns
Return Type | Summary |
---|---|
A |
Code Samples
Retrieving DataStore Versions With A Date Filter
The following code sample retrieves all versions after a specified starting time, sorted in ascending order.