Esempio n. 1
0
 /**
  * Retrieve table status
  *
  * @param string $tableName
  * @return \Magento\Framework\Object|bool
  */
 public function getTableStatus($tableName)
 {
     $row = $this->_write->showTableStatus($tableName);
     if ($row) {
         $statusObject = new \Magento\Framework\Object();
         foreach ($row as $field => $value) {
             $statusObject->setData(strtolower($field), $value);
         }
         $cntRow = $this->_write->fetchRow($this->_write->select()->from($tableName, 'COUNT(1) as rows'));
         $statusObject->setRows($cntRow['rows']);
         return $statusObject;
     }
     return false;
 }