Tablo adını ve satırın birincil anahtarını belirterek Tablestore veri tablosundan tek bir satırı silin.
Başlamadan önce
Yöntem
public function deleteRow(array $request)
Örnek
test_table tablosundan birincil anahtar değeri row1 olan satırı silin:
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.";
}