Elimine una sola fila de una tabla de datos de Tablestore al especificar el nombre de la tabla y la clave principal de la fila.
Antes de empezar
Método
public function deleteRow(array $request)
Ejemplo
Elimine la fila cuyo valor de clave principal es row1 de la tabla 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.";
}