Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Connection::executeUpdate PHP 메소드

executeUpdate() 공개 메소드

public executeUpdate ( string $query, array $params = [], array $types = [] ) : integer
$query string
$params array
$types array
리턴 integer The number of affected rows.
    public function executeUpdate($query, array $params = array(), array $types = array())
    {
        $stmt = null;
        $attempt = 0;
        $retry = true;
        while ($retry) {
            $retry = false;
            try {
                $stmt = parent::executeUpdate($query, $params, $types);
            } catch (\Exception $e) {
                if ($this->canTryAgain($attempt) && $this->isRetryableException($e)) {
                    $this->close();
                    ++$attempt;
                    $retry = true;
                } else {
                    throw $e;
                }
            }
        }
        return $stmt;
    }