Change-Id: I7ef34545a9b4cfa6ed8bcdd302ad49faa7747974
*/
public function has( array $conditions = array() );
+ /**
+ * Checks if the table exists
+ *
+ * @since 1.21
+ *
+ * @return boolean
+ */
+ public function exists();
+
/**
* Returns the amount of matching records.
* Condition field names get prefixed.
return $this->selectRow( array( 'id' ), $conditions ) !== false;
}
+ /**
+ * Checks if the table exists
+ *
+ * @since 1.21
+ *
+ * @return boolean
+ */
+ public function exists() {
+ $dbr = $this->getReadDbConnection();
+ $exists = $dbr->tableExists( $this->getName() );
+ $this->releaseConnection( $dbr );
+
+ return $exists;
+ }
+
/**
* Returns the amount of matching records.
* Condition field names get prefixed.