Hio. I noticed the following API changes appeared in Roblox’s CI branch recently:
Added Class DataStoreInfo : Instance [NotCreatable]
Added Property string DataStoreInfo.Name [ReadOnly]
Added Property int64 DataStoreInfo.UpdatedTime [ReadOnly]
Added Property int64 DataStoreInfo.createdTime [ReadOnly]
Added Class GetDataStoreOptions : Instance [NotReplicated]
Added Function void GetDataStoreOptions:setExperimentalFeatures(Dictionary experimentalFeatures)
Added Class DataStoreEnumerationPages : Pages [NotCreatable] [NotReplicated]
Added Function Instance DataStoreService:ListDataStoresAsync(string prefix = "", int pageSize = 0) [Yields]
Added Enum ScopeOptions
Added EnumItem ScopeOptions.AllKeys : 0
Added Tag [Yields] to Function DataStoreService:GetDataStore
Changed the parameters of Function DataStoreService:GetDataStore
from: (string name, string scope = "global")
to: (string name, Variant scope, Instance options = nil)
There are a few problems that I think should be addressed before this goes out to production:
Members should use PascalCase
rather than camelCase
.
All of Roblox’s non-deprecated and non-internal Lua APIs should use PascalCase for the sake of consistency with all other existing APIs.
This issue is present with DataStoreInfo.createdTime
and GetDataStoreOptions:setExperimentalFeatures
.
GetDataStoreOptions
really should not be an Instance.
For something that ultimately just wraps a dictionary, I feel like these options should just be passed in as an optional dictionary, with documentation provided on the DevHub. Maybe there are bigger plans for this which facilitate the need for this to be an Instance, but as of right now it just seems very weird.
The declaration of DataStoreInfo.Name
overloads Instance.Name
?
This is an interesting case which might hold despite my scrutiny, but I still think its an unusual roundabout way to make the name of a DataStoreInfo immutable. It feels like this should be something handled internally rather than explicitly redefining the Name property to make it read-only.
If someone were to get a DataStoreInfo visible in the DataModel to be selected in Roblox Studio’s explorer window, attempting to rename it might cause some interesting problems.
Let me know if you have any comments or feedback on my points here.
Thank you!