Skip to main content
Version: 5.11.2

DeleteData

public BackendReturnObject DeleteMyLatestData(string tableName);
public BackendReturnObject DeleteMyData(string tableName, string inDate);
public BackendReturnObject DeleteOtherData(string tableName, string inDate, string owner_inDate);

Parameters

ValueTypeDescription
tableNamestringTable name of the game information to be deleted
inDatestringinDate value of the row to be deleted
owner_inDatestringinDate of the user who owns the row

Description

DeleteMyLatestData method deletes a piece of my data that has been registered most recently in the table.
DeleteMyData method deletes a piece of my data in the table identical to inDate.
DeleteOtherData method deletes a piece of my data in the table identical to inDate and owner_inDate. (If public, the data of others can also be deleted.)

  • The data can be deleted regardless of their schema definition statuses.
  • You can only delete your own public/private data.
  • You can delete the public data of others.
  • You cannot delete the private data of others. You can import your owner_inDate via { Backend.UserInDate }.

Example

Synchronous

// Delete my data that has been registered most recently in the table
Backend.PlayerData.DeleteMyLatestData("tableName");

// Delete my data in the table that is identical to inDate
Backend.PlayerData.DeleteMyData("tableName", "2023-10-25:11:34:24.124Z");

// Delete data in the table identical to inDate and owner_inDate (data of others can also be deleted)

Backend.PlayerData.DeleteOtherData("tableName", "2023-10-25:11:34:24.124Z", "2023-10-22:09:14:35.616Z");

Asynchronous

// Delete my data that has been registered most recently in the table
Backend.PlayerData.DeleteMyLatestData("tableName", (callback) =>
{
// Post-process
});

// Delete data in the table that is identical to inDate
Backend.PlayerData.DeleteMyData("tableName", "2023-10-25:11:34:24.124Z", (callback) =>
{
// Post-process
});

// Delete data in the table identical to inDate and owner_inDate (data of others can also be deleted)
Backend.PlayerData.DeleteOtherData("tableName", "2023-10-25:11:34:24.124Z", "2023-10-22:09:14:35.616Z", (callback) =>
{
// Post-process
});

SendQueue

// Delete my data that has been registered most recently in the table
SendQueue.Enqueue(Backend.PlayerData.DeleteMyLatestData, "tableName", (callback) =>
{
// Post-process
});

// Delete data in the table that is identical to inDate
SendQueue.Enqueue(Backend.PlayerData.DeleteMyData, "tableName", "2023-10-25:11:34:24.124Z", (callback) =>
{
// Post-process
});

// Delete data in the table identical to inDate and owner_inDate (data of others can also be deleted)
SendQueue.Enqueue(BackendBackend.PlayerData.DeleteOtherData, "tableName", "2023-10-25:11:34:24.124Z", "2023-10-22:09:14:35.616Z", (callback) =>
{
// Post-process
});

ReturnCase

Success cases

When the lookup is successful
statusCode : 200

returnValue : {"ConsumedCapacity":{"Write":{"CapacityUnits":{Read capacity}}}} Example: {"ConsumedCapacity":{"Write":{"CapacityUnits":3}}}

Error cases

When it was owner_inDate of a user that does not exist statusCode : 400
errorCode : BadParameterException

When the user tries to delete the information of others' private table
statusCode : 403
errorCode : ForbiddenException

When the user tries to delete a non-existent row
statusCode : 404
errorCode : NotFoundException

When the user tries to delete a non-existent table
statusCode : 404
errorCode : NotFoundException

When an attempt is made to delete an inactive table
statusCode : 412
errorCode : PreconditionFailed