public function truncateTable($name, $exec = true) {
        if (is_object($name) && $name instanceof TableBuilder)
            $name = $name->name;
        $cmd = array(
            'mysql|ibm|pgsql|sybase|dblib|mssql|sqlsrv|odbc' =>
                'TRUNCATE TABLE '.$this->db->quotekey($name).';',
            'sqlite2?' => array(
                'DELETE FROM '.$this->db->quotekey($name).';',
//                'UPDATE SQLITE_SEQUENCE SET seq = 0 WHERE name = '.$this->db->quotekey($name).';',
            ),
        );
        $query = $this->findQuery($cmd);
        return ($exec) ? $this->db->exec($query) : $query;
    }
public function truncateTable($name, $exec = true) {
        if (is_object($name) && $name instanceof TableBuilder)
            $name = $name->name;
        $cmd = array(
            'mysql|ibm|pgsql|sybase|dblib|mssql|sqlsrv|odbc' =>
                'TRUNCATE TABLE '.$this->db->quotekey($name).';',
            'sqlite2?' => array(
                'DELETE FROM '.$this->db->quotekey($name).';',
//                'UPDATE SQLITE_SEQUENCE SET seq = 0 WHERE name = '.$this->db->quotekey($name).';',
            ),
        );
        $query = $this->findQuery($cmd);
        return ($exec) ? $this->db->exec($query) : $query;
    }
public function truncateTable ( $ name , $ exec = true ) { if ( is_object ( $ name ) && $ name instanceof TableBuilder ) $ name = $ name -> name ; $ cmd = array ( 'mysql|ibm|pgsql|sybase|dblib|mssql|sqlsrv|odbc' => 'TRUNCATE TABLE ' . $ this -> db -> quotekey ( $ name ) . ';' , 'sqlite2?' => array ( 'DELETE FROM ' . $ this -> db -> quotekey ( $ name ) . ';' , //                'UPDATE SQLITE_SEQUENCE SET seq = 0 WHERE name = '.$this->db->quotekey($name).';', ) , ) ; $ query = $ this -> findQuery ( $ cmd ) ; return ( $ exec ) ? $ this -> db -> exec ( $ query ) : $ query ; }
clear a table
@param $name
@param bool $exec
@return array|bool|FALSE|int|string
clear a table