Sign In Register

How can we help you today?

Start a new topic

Game Data Service type names and index shortcode allowed characters

 

Using the new GameDataService, it is possible to create data types with underscores in the name (e.g. "player_data").

From what I understand in the documentation for creating indexes, I can add indexes to fields of the existing content. It seems that the way to do this requires matching the shortcode of the index to the data type. I am unable to do this because the UI only allows alphanumeric characters for index shortcodes.

The bug is the apparent mismatch in allowed naming conventions of the Data Type and Data Type index shortcode.


Hi Lo,


Just to clarify what you are saying here. If you have a document containing a key value pair such as {"my_key": "value"} you can't go back into that data type and add an index for "my_key" as the underscore is an invalid character ? Is that correct ? There is no restriction on what you can insert into a data type although there is one on the characters that you can use on a key for indexing. I imagine the the best thing to do here would be to plan your indexes accordingly and create ahead of time (where possible) or if you need to index an existing field make sure it's one that doesn't contain an invalid character.


Regards,

Liam 

I am not talking about the key/value, I am talking about the name of the data type itself. The example used in your tutorial is "raceData".

While the "best" thing would be to develop the data structure and indexes ahead of time, your own documentation states that it's OK to come back later and add indexes. We're using GameSparks as a platform for agile development and evolving our design rapidly. We're also learning about the restrictions imposed by the GameDataService on the fly. Both impact our design and force us to reevaluate our decisions in real time.

It would be helpful if both the documentation, administrative UI, and cloud code would enforce the same character restrictions and message accordingly.
  • It was only through the UI that I learned that the _ and | characters are invalid key values. Cloud Code returns an obscure error.
  • I was able to create a Data Type with an underscore in the name through Cloud Code, but could not create a shortcode of the same name in the UI.


Login to post a comment