Skip to content

Commit

Permalink
#285 - removing unused code from the ActiveRecordProviderSQLite class
Browse files Browse the repository at this point in the history
  • Loading branch information
alphadevx committed Jan 22, 2017
1 parent 4c117ca commit f8979c1
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Alpha/Model/ActiveRecordProviderSQLite.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,6 @@ public function loadByAttribute($attribute, $value, $ignoreClassType = false, $l
$this->BO->setLastQuery($sqlQuery);
$stmt = self::getConnection()->prepare($sqlQuery);

$row = array();

if ($stmt instanceof SQLite3Stmt) {
if ($this->BO->getPropObject($attribute) instanceof Integer) {
if (!$ignoreClassType && $this->BO->isTableOverloaded()) {
Expand Down Expand Up @@ -461,7 +459,7 @@ public function loadAll($start = 0, $limit = 0, $orderBy = 'OID', $order = 'ASC'

// ensure that the field name provided in the orderBy param is legit
try {
$field = $this->BO->get($orderBy);
$this->BO->get($orderBy);
} catch (AlphaException $e) {
throw new AlphaException('The field name ['.$orderBy.'] provided in the param orderBy does not exist on the class ['.get_class($this->BO).']');
}
Expand Down Expand Up @@ -807,7 +805,6 @@ public function loadAllFieldValuesByAttribute($attribute, $value, $returnAttribu
// now build an array of attribute values to be returned
$values = array();
$count = 0;
$RecordClass = get_class($this->BO);

while ($row = $result->fetchArray()) {
$values[$count] = $row[$returnAttribute];
Expand Down Expand Up @@ -1029,8 +1026,6 @@ public function save()
}
} catch (Exception $e) {
throw new FailedSaveException('Failed to update a MANY-TO-MANY relation on the object, error is ['.$e->getMessage().']');

return;
}
}

Expand Down Expand Up @@ -1716,8 +1711,6 @@ public function checkTableExists($checkHistoryTable = false)
{
self::$logger->debug('>>checkTableExists(checkHistoryTable=['.$checkHistoryTable.'])');

$config = ConfigProvider::getInstance();

$tableExists = false;

$sqlQuery = 'SELECT name FROM sqlite_master WHERE type = "table";';
Expand Down Expand Up @@ -2160,8 +2153,6 @@ public function checkRecordExists($OID)
$this->BO->setLastQuery($sqlQuery);
$stmt = self::getConnection()->prepare($sqlQuery);

$row = array();

if ($stmt instanceof SQLite3Stmt) {
$stmt->bindValue(':OID', $OID, SQLITE3_INTEGER);

Expand Down

0 comments on commit f8979c1

Please sign in to comment.