protected function updateInternal($row, $existingRow = null)
    {
        $equal = isset($existingRow) && isset($existingRow['data']) && $row['data'] === $existingRow['data'];
        $id = $row['sid'];
        unset($row['sid']);
        //If data not changed then just update timestamp
        if ($equal) {
            unset($row['data']);
        }
        return $this->createCommand()
            ->update($this->table, $row, ['sid' => $id])
            ->execute();
    }
protected function updateInternal($row, $existingRow = null)
    {
        $equal = isset($existingRow) && isset($existingRow['data']) && $row['data'] === $existingRow['data'];
        $id = $row['sid'];
        unset($row['sid']);
        //If data not changed then just update timestamp
        if ($equal) {
            unset($row['data']);
        }
        return $this->createCommand()
            ->update($this->table, $row, ['sid' => $id])
            ->execute();
    }
protected function updateInternal ( $ row , $ existingRow = null ) { $ equal = isset ( $ existingRow ) && isset ( $ existingRow [ 'data' ] ) && $ row [ 'data' ] === $ existingRow [ 'data' ] ; $ id = $ row [ 'sid' ] ; unset ( $ row [ 'sid' ] ) ; //If data not changed then just update timestamp if ( $ equal ) { unset ( $ row [ 'data' ] ) ; } return $ this -> createCommand ( ) -> update ( $ this -> table , $ row , [ 'sid' => $ id ] ) -> execute ( ) ; }
Update existing entry in DB
@param array      $row
@param array|null $existingRow
@return ExtendedPromiseInterface|\Reaction\Promise\LazyPromiseInterface
Update existing entry in DB