src/Database/Model.php
public function update()
    {
        if ($this->dirty === []) {
            return true;
        }

        $this->defaultTable();
        $this->sql['SET'] = $this->dirty;
        $this->eq($this->primary, $this->__get($this->primary));

        if (DB::update($this->sql)) {
            return $this->dirty()->reset();
        }

        return false;
    }
public function update()
    {
        if ($this->dirty === []) {
            return true;
        }

        $this->defaultTable();
        $this->sql['SET'] = $this->dirty;
        $this->eq($this->primary, $this->__get($this->primary));

        if (DB::update($this->sql)) {
            return $this->dirty()->reset();
        }

        return false;
    }
public function update ( ) { if ( $ this -> dirty === [ ] ) { return true ; } $ this -> defaultTable ( ) ; $ this -> sql [ 'SET' ] = $ this -> dirty ; $ this -> eq ( $ this -> primary , $ this -> __get ( $ this -> primary ) ) ; if ( DB :: update ( $ this -> sql ) ) { return $ this -> dirty ( ) -> reset ( ) ; } return false ; }
function to build update SQL, and update current record in database, just write the dirty data into database.

@return bool|self if update success return current object, other wise return false.
function to build update SQL and update current record in database just write the dirty data into database .