protected function doUpdateBatch($data, array $conditions)
    {
        !$this->useTransaction ?: $this->db->getTransaction(true)->start();

        try {
            $result = $this->db->getWriter()->updateBatch($this->table, $data, $conditions);
        } catch (\Throwable $e) {
            !$this->useTransaction ?: $this->db->getTransaction(true)->rollback();

            throw $e;
        }

        !$this->useTransaction ?: $this->db->getTransaction(true)->commit();

        return $result;
    }
protected function doUpdateBatch($data, array $conditions)
    {
        !$this->useTransaction ?: $this->db->getTransaction(true)->start();

        try {
            $result = $this->db->getWriter()->updateBatch($this->table, $data, $conditions);
        } catch (\Throwable $e) {
            !$this->useTransaction ?: $this->db->getTransaction(true)->rollback();

            throw $e;
        }

        !$this->useTransaction ?: $this->db->getTransaction(true)->commit();

        return $result;
    }
protected function doUpdateBatch ( $ data , array $ conditions ) { ! $ this -> useTransaction ? : $ this -> db -> getTransaction ( true ) -> start ( ) ; try { $ result = $ this -> db -> getWriter ( ) -> updateBatch ( $ this -> table , $ data , $ conditions ) ; } catch ( \ Throwable $ e ) { ! $ this -> useTransaction ? : $ this -> db -> getTransaction ( true ) -> rollback ( ) ; throw $ e ; } ! $ this -> useTransaction ? : $ this -> db -> getTransaction ( true ) -> commit ( ) ; return $ result ; }
Do updateAll action.

@param   mixed $data       The data we want to update to every rows.
@param   mixed $conditions Where conditions, you can use array or Compare object.

@return  boolean

@throws \Exception
@throws \Throwable
Do updateAll action .