Exemple #1
0
 /**
  * Erase record
  *
  * @return int
  */
 public function drop()
 {
     list($sql, $values) = SQL::delete($this->entity->name, $this->where);
     return $this->execute($sql, $values, function (\PDOStatement $statement) {
         return $statement->rowCount();
     });
 }
Exemple #2
0
 /**
  * Clear entity data
  *
  * @return bool
  */
 public function clear()
 {
     $sql = SQL::truncateTable($this->entity->name);
     return $this->execute($sql);
 }