Delete
public BackendReturnObject Delete(string tableName, Where where);
Parameters
Value | Type | Description |
---|---|---|
tableName | string | Table name of the game information to be deleted |
where | Where | The where clause to search |
Description
From the values stored in the table, searches and deletes one row that corresponds to the 'where' conditional statement.
- The data can be deleted regardless of their schema definition statuses.
- Only one row can be deleted.
- When multiple rows are found by the where query, the most recently created row is deleted.
- Regardless of public/private status, you can only delete your own data.
When an attempt is made to delete without conditions
When the condition is not specified, such as in the case of new Where(), the deletion is proceeded for the row most recently added from the rows owned by the user.
Example
Synchronous
// Remove the most recent data whose itemCode column is dragon_sword
Where where = new Where();
where.Equal("itemCode", "dragon_sword");
Backend.GameData.Delete("tableName", where);
Asynchronous
// Remove the most recent data whose itemCode column is dragon_sword
Where where = new Where();
where.Equal("itemCode", "dragon_sword");
Backend.GameData.Delete("tableName", where, (callback) =>
{
// Post-process
});
SendQueue
// Remove the most recent data whose itemCode column is dragon_sword
Where where = new Where();
where.Equal("itemCode", "dragon_sword");
SendQueue.Enqueue(Backend.GameData.Delete, "tableName", where, (callback) =>
{
// Post-process
});
Return cases
Success cases
When the lookup is successful
statusCode : 204
Error cases
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 the user searches the table to be deleted with the where condition, but the table does not exist
statusCode : 404
errorCode : NotFoundException
When an attempt is made to delete an inactive table
statusCode : 412
errorCode : PreconditionFailed