$resultInstance->setResultArray($resultArray);
// Set affected rows
- $resultInstance->setAffectedRows(count($resultArray[BaseDatabaseFrontend::RESULT_INDEX_ROWS]));
+ $resultInstance->setAffectedRows(count($resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS]));
// Return the instance
return $resultInstance;
// Now get the update criteria array and update all entries
foreach ($updateInstance->getUpdateCriteria() as $criteriaKey => $criteriaValue) {
// Update data
- $this->resultArray[BaseDatabaseFrontend::RESULT_INDEX_ROWS][$entryKey][$criteriaKey] = $criteriaValue;
+ $this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][$entryKey][$criteriaKey] = $criteriaValue;
// Mark it as out-dated
$this->outDated[$criteriaKey] = 1;
if ($this->valid()) {
// Next entry found, so count one up and cache it
$this->currentPos++;
- $this->currentRow = $this->resultArray[BaseDatabaseFrontend::RESULT_INDEX_ROWS][$this->currentPos];
+ $this->currentRow = $this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][$this->currentPos];
$nextValid = true;
} // END - if
$this->rewind();
// Search for the entry
- while ($this->currentPos < $index && ($this->valid())) {
+ while (($this->currentPos < $index) && ($this->valid())) {
// Continue on
$this->next();
} // END - while
$current = NULL;
// Does the current enty exist?
- if (isset($this->resultArray[BaseDatabaseFrontend::RESULT_INDEX_ROWS][$this->currentPos])) {
+ if (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][$this->currentPos])) {
// Then get it
- $current = $this->resultArray[BaseDatabaseFrontend::RESULT_INDEX_ROWS][$this->currentPos];
+ $current = $this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][$this->currentPos];
} // END - if
// Return the result
$isValid = false;
// Check if
- if (($this->ifStatusIsOkay()) && (isset($this->resultArray[BaseDatabaseFrontend::RESULT_INDEX_ROWS][($this->currentPos + 1)])) && (isset($this->resultArray[BaseDatabaseFrontend::RESULT_INDEX_ROWS][0]))) {
+ if (($this->ifStatusIsOkay()) && (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][($this->currentPos + 1)])) && (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][0]))) {
// All fine!
$isValid = true;
} // END - if
* @return $ifStatusOkay Whether the status of the query was okay
*/
public function ifStatusIsOkay () {
- return ((isset($this->resultArray[BaseDatabaseFrontend::RESULT_INDEX_STATUS])) && ($this->resultArray[BaseDatabaseFrontend::RESULT_INDEX_STATUS] === LocalfileDatabase::RESULT_OKAY));
+ return ((isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_STATUS])) && ($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_STATUS] === LocalfileDatabase::RESULT_OKAY));
}
/**
* @para $callBack Call-back object for setting the index;
* 0=object instance,1=method name
* @return void
-4 * @todo Find a caching way without modifying the result array
+ * @todo Find a caching way without modifying the result array
*/
public function solveResultIndex ($databaseColumn, BaseDatabaseWrapper $wrapperInstance, array $callBack) {
// By default nothing is found