Supprimez une seule ligne d'une table de données Tablestore en spécifiant le nom de la table et la clé primaire de la ligne.
Avant de commencer
Méthode
public function deleteRow(array $request)
Exemple
Supprimez la ligne dont la valeur de clé primaire est row1 de la table 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.";
}