Table.delete()

Deletes the specified document from a table.

Operations Performed

Verifies that the specified document exists.
  • 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 the "Table Paths" section in MapR-DB JSON Tables.

Permissions Required

Link to Javadoc

Table