Table.delete()
Deletes the specified document from a table.
Operations Performed
- If the document does not exist, return true.
- If the row exists, delete the document.
Example
public void deleteDocById(String tablePath, String _id) {
try(Table table = MapRDB.getTable(tablePath)) {
table.delete(_id);
}
}
Parameter | Description |
---|---|
_id |
The value of the document's _id field. |
tablePath |
The path of the table in the MapR file system. See Table Paths. |
Permissions Required
- The
writeAce
permission on the volumes where the JSON tables that contain the documents are located. For information about how to set permissions on volumes, see Setting/Modifying Whole Volume ACEs. writeperm
on the column families in the row. See How to Obtainreadperm
orwriteperm
on a Field.
Link to Javadoc
Table