You are here

public function PHPExcel_CachedObjectStorage_SQLite::isDataSet in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite.php \PHPExcel_CachedObjectStorage_SQLite::isDataSet()

* Is a value set for an indexed cell? * *

Parameters

string $pCoord Coordinate address of the cell to check: * @return boolean

Overrides PHPExcel_CachedObjectStorage_CacheBase::isDataSet

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite.php, line 133

Class

PHPExcel_CachedObjectStorage_SQLite
PHPExcel_CachedObjectStorage_SQLite

Code

public function isDataSet($pCoord) {
  if ($pCoord === $this->_currentObjectID) {
    return true;
  }

  //	Check if the requested entry exists in the cache
  $query = "SELECT id FROM kvp_" . $this->_TableName . " WHERE id='" . $pCoord . "'";
  $cellResultSet = $this->_DBHandle
    ->query($query, SQLITE_ASSOC);
  if ($cellResultSet === false) {
    throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle
      ->lastError()));
  }
  elseif ($cellResultSet
    ->numRows() == 0) {

    //	Return null if requested entry doesn't exist in cache
    return false;
  }
  return true;
}