src/Db/Command.php
public function execute($lazy = true)
    {
        $sql = $this->getSql();
        $rawSql = $this->getRawSql();

        if ($sql == '') {
            return reject(false);
        }

        $execPromise = $this->internalExecute($rawSql, [], $lazy);
        $needResCount = $this->needResultsCount();
        $thenCallback = function($results = []) use ($needResCount) {
            $result = $needResCount ? count($results) : true;
            return $this->refreshTableSchema()->then(
                function() use ($result) {
                    return $result;
                }
            );
        };
        return $execPromise instanceof LazyPromiseInterface
            ? $execPromise->thenLazy($thenCallback)
            : $execPromise->then($thenCallback);
    }
public function execute($lazy = true)
    {
        $sql = $this->getSql();
        $rawSql = $this->getRawSql();

        if ($sql == '') {
            return reject(false);
        }

        $execPromise = $this->internalExecute($rawSql, [], $lazy);
        $needResCount = $this->needResultsCount();
        $thenCallback = function($results = []) use ($needResCount) {
            $result = $needResCount ? count($results) : true;
            return $this->refreshTableSchema()->then(
                function() use ($result) {
                    return $result;
                }
            );
        };
        return $execPromise instanceof LazyPromiseInterface
            ? $execPromise->thenLazy($thenCallback)
            : $execPromise->then($thenCallback);
    }
Executes the SQL statement.
This method should only be used for executing non-query SQL statement, such as `INSERT`, `DELETE`, `UPDATE` SQLs.
No result set will be returned.
@param bool $lazy Use LazyPromise
@return ExtendedPromiseInterface|LazyPromiseInterface