Phactory\Sql\Blueprint::recall PHP Method

recall() public method

* Truncate table in the database.
public recall ( )
    public function recall()
    {
        $db_util = DbUtilFactory::getDbUtil($this->_phactory);
        $db_util->disableForeignKeys();
        try {
            $sql = "DELETE FROM {$this->_table->getName()}";
            $this->_phactory->getConnection()->exec($sql);
        } catch (Exception $e) {
        }
        foreach ($this->_associations as $association) {
            if ($association instanceof Association\ManyToMany) {
                try {
                    $sql = "DELETE FROM {$association->getJoinTable()}";
                    $this->_phactory->getConnection()->exec($sql);
                } catch (Exception $e) {
                }
            }
        }
        $db_util->enableForeignKeys();
    }