Hapus satu baris dari tabel Tablestore dengan menentukan nama tabel dan kunci primernya.
Sebelum memulai
Metode
public function deleteRow(array $request)
Contoh
Hapus baris dengan nilai kunci primer row1 dari tabel test_table:
try{
$response = $client->deleteRow(array (
'table_name' => 'test_table',
'primary_key' => array (
array ('id', 'row1')
),
// Kondisi diperlukan untuk menghapus baris. RowExistenceExpectationConst::CONST_IGNORE menentukan bahwa keberadaan baris tidak diperiksa.
'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.";
}