0

I'm having hard times trying to understand Data Types. Maybe I'm missing something because I feel totally off road in understanding them.

Here are all the questions wandering in my mind:

  • how can I delete a Data Type? Seems there's no button in the UI and no API for Cloud Code that could help.
  • why if I create a Data Index it creates a new Data Type named the same as the Data Index?

If all these don't make sense I think I'm more off road than I thought.

Mirko
  • 187
  • 12

1 Answers1

0

About deleting by UI, from GameSpark Documentation:

You can Drop a Data Type to remove all of its data

To remove just an item inside a Data Type just open the data type, find the item, click on it, then click on remove (in case of one result) or on the bin icon (in case of multiple results).

About deleting by cloud code, from GameSpark form, seem like you have to delete the document inside the item:

 var sparkDataGetResult = Spark.getGameDataService().getItem(myDataType, myId);
 var sparkDataItem = sparkDataGetResult.document();
 sparkDataItem.delete();`

You can iterate on a Spark.getGameDataService().queryItems(string type, SparkDataCondition condition) if you need to delete more items at once by cloud code. More here

About the Data Index, its menu allow you to add indexes only on existing Data Types, so it will create a Data Types before adding an index. More about indexes here

lunix15
  • 84
  • 1
  • 6