Scalr\Upgrade\UpgradeHandler::fetchMysqlStatusBefore PHP 메소드

fetchMysqlStatusBefore() 개인적인 메소드

Getches statuses of the previous updates for specified database service from container
private fetchMysqlStatusBefore ( string $service = 'adodb' )
$service string Service name for database connection in DI container
    private function fetchMysqlStatusBefore($service = 'adodb')
    {
        $db = \Scalr::getContainer()->{$service};
        //Loads performed updates of MYSQL type
        $rs = $db->Execute("\n            SELECT LOWER(HEX(u.`uuid`)) `uuid`, u.`released`, u.`appears`, u.`applied`, u.`status`, LOWER(HEX(u.`hash`)) `hash`\n            FROM `" . self::DB_TABLE_UPGRADES . "` u\n        ");
        while ($rec = $rs->FetchRow()) {
            $entity = new MysqlUpgradeEntity();
            $entity->load($rec);
            $this->stateBefore[$rec['uuid']] = $entity;
            if (isset($entity->appears) && $this->maxDate < $entity->appears) {
                $this->maxDate = $entity->appears;
            }
        }
    }