protected function getGerritApprovalByIdentifier($patchSetId, $type, $by)
    {
        $dbHandle = $this->getDatabase()->getDatabaseConnection();

        $query = 'SELECT `id`, `patchset`, `type`, `description`, `value`, `granted_on`, `by`
                  FROM ' . Database::TABLE_APPROVAL . '
                  WHERE `patchset` = :patchset
                        AND `type` = :type
                        AND `by` = :by';
        $statement = $dbHandle->prepare($query);

        $statement->bindParam(':patchset', $patchSetId, \PDO::PARAM_INT);
        $statement->bindParam(':type', $type, \PDO::PARAM_STR);
        $statement->bindParam(':by', $by, \PDO::PARAM_INT);
        $executeResult = $statement->execute();

        $statement = $this->getDatabase()->checkQueryError($statement, $executeResult);
        return $statement->fetch(\PDO::FETCH_ASSOC);
    }
protected function getGerritApprovalByIdentifier($patchSetId, $type, $by)
    {
        $dbHandle = $this->getDatabase()->getDatabaseConnection();

        $query = 'SELECT `id`, `patchset`, `type`, `description`, `value`, `granted_on`, `by`
                  FROM ' . Database::TABLE_APPROVAL . '
                  WHERE `patchset` = :patchset
                        AND `type` = :type
                        AND `by` = :by';
        $statement = $dbHandle->prepare($query);

        $statement->bindParam(':patchset', $patchSetId, \PDO::PARAM_INT);
        $statement->bindParam(':type', $type, \PDO::PARAM_STR);
        $statement->bindParam(':by', $by, \PDO::PARAM_INT);
        $executeResult = $statement->execute();

        $statement = $this->getDatabase()->checkQueryError($statement, $executeResult);
        return $statement->fetch(\PDO::FETCH_ASSOC);
    }
protected function getGerritApprovalByIdentifier ( $ patchSetId , $ type , $ by ) { $ dbHandle = $ this -> getDatabase ( ) -> getDatabaseConnection ( ) ; $ query = 'SELECT `id`, `patchset`, `type`, `description`, `value`, `granted_on`, `by`
                  FROM ' . Database :: TABLE_APPROVAL . '
                  WHERE `patchset` = :patchset
                        AND `type` = :type
                        AND `by` = :by' ; $ statement = $ dbHandle -> prepare ( $ query ) ; $ statement -> bindParam ( ':patchset' , $ patchSetId , \ PDO :: PARAM_INT ) ; $ statement -> bindParam ( ':type' , $ type , \ PDO :: PARAM_STR ) ; $ statement -> bindParam ( ':by' , $ by , \ PDO :: PARAM_INT ) ; $ executeResult = $ statement -> execute ( ) ; $ statement = $ this -> getDatabase ( ) -> checkQueryError ( $ statement , $ executeResult ) ; return $ statement -> fetch ( \ PDO :: FETCH_ASSOC ) ; }
Returns a approval by the unique identifier

@param int $patchSetId ID of a record from the patchset table
@param string $type Type of the approval
@param int $by Person of the approval
@return mixed
Returns a approval by the unique identifier