Skip to main content
Version: 6.0.0

DeleteData

public BackndReturnObject DeleteMyLatestData(string tableName);
public BackndReturnObject DeleteMyData(string tableName, string inDate);
public BackndReturnObject 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 { Backnd.PlayerInDate }.

Example

Synchronous

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

// Delete my data in the table that is identical to inDate
Backnd.PlayerTable.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)

Backnd.PlayerTable.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
Backnd.PlayerTable.DeleteMyLatestData("tableName", (callback) =>
{
// Post-process
});

// Delete data in the table that is identical to inDate
Backnd.PlayerTable.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)
Backnd.PlayerTable.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