public function truncateTable($database_table, $timeOut = 2000)
    {
        $out = [];
        list($db, $table) = explode('.', $database_table);
        $nodes = $this->getMasterNodeForTable($database_table);
        // scan need node`s
        foreach ($nodes as $node)
        {
            $def = $this->client($node)->getTimeout();
            $this->client($node)->database($db)->setTimeout($timeOut);
            $out[$node] = $this->client($node)->truncateTable($table);
            $this->client($node)->setTimeout($def);
        }
        return $out;
    }
public function truncateTable($database_table, $timeOut = 2000)
    {
        $out = [];
        list($db, $table) = explode('.', $database_table);
        $nodes = $this->getMasterNodeForTable($database_table);
        // scan need node`s
        foreach ($nodes as $node)
        {
            $def = $this->client($node)->getTimeout();
            $this->client($node)->database($db)->setTimeout($timeOut);
            $out[$node] = $this->client($node)->truncateTable($table);
            $this->client($node)->setTimeout($def);
        }
        return $out;
    }
public function truncateTable ( $ database_table , $ timeOut = 2000 ) { $ out = [ ] ; list ( $ db , $ table ) = explode ( '.' , $ database_table ) ; $ nodes = $ this -> getMasterNodeForTable ( $ database_table ) ; // scan need node`s foreach ( $ nodes as $ node ) { $ def = $ this -> client ( $ node ) -> getTimeout ( ) ; $ this -> client ( $ node ) -> database ( $ db ) -> setTimeout ( $ timeOut ) ; $ out [ $ node ] = $ this -> client ( $ node ) -> truncateTable ( $ table ) ; $ this -> client ( $ node ) -> setTimeout ( $ def ) ; } return $ out ; }
Truncate on all nodes
@deprecated
@param string $database_table
@return array
@throws Exception\TransportException
Truncate on all nodes