You are here

public function DataTable::revert in Data 6

Same name and namespace in other branches
  1. 7 includes/DataTable.inc \DataTable::revert()

Revert a table to its definition in code.

Does not revert a table if it is not defined in code.

Return value

TRUE if the table was reverted, FALSE otherwise.

File

includes/DataTable.inc, line 509
Contains class definition for DataTable.

Class

DataTable
Manages data access and manipulation for a single data table. Use data_create_table() or data_get_table() to instantiate an object from this class.

Code

public function revert() {
  if ($this->export_type & EXPORT_IN_CODE) {
    db_query('DELETE FROM {data_tables} WHERE name = "%s"', $this->name);
    return TRUE;
  }
  return FALSE;
}