Delete a single row from a Tablestore table by specifying the table name and primary key.
Before you begin
Method
public function deleteRow(array $request)Example
Delete the row with primary key value row1 from test_table:
try{
$response = $client->deleteRow(array (
'table_name' => 'test_table',
'primary_key' => array (
array ('id', 'row1')
),
// A condition is required to delete a row. RowExistenceExpectationConst::CONST_IGNORE specifies that the existence of the row is not checked.
'condition' => RowExistenceExpectationConst::CONST_IGNORE
));
echo "Read CU Cost: " . $response['consumed']['capacity_unit']['read'] . "\n";
echo "Write CU Cost: " . $response['consumed']['capacity_unit']['write'] . "\n";
} catch (Exception $e) {
echo "Delete Row failed.";
}