Delete a Row

A single row can be deleted, but multiple rows cannot be deleted at a time. The row used in the below code snippets is the row object. A row can be deleted from a table simply by passing the ROWID as a parameter to the delete() method.

Note : The promise returned here will be resolved to an object in which the content key contains a deleted row object.
//Delete the row which in turn returns a promise var datastore = catalyst.table; var table = datastore.tableId('SampleTable'); var row = table.rowId(ROW_ID); var rowPromise = row.delete(); rowPromise.then((response) => { console.log(response.content); }) .catch((err) => { console.log(err); });

Last Updated 2023-07-12 12:52:30 +0530 +0530