original_string: public function update()
  	{
  		// temporary disable relations
  		$tmp_relations   = $this->relations;
  		$this->relations = array();
  
  		// Build query and execute update
  		$query = \DB::update(call_user_func($this->model.'::table'));
  		$tmp   = $this->build_query($query, array(), 'update');
  		$query = $tmp['query'];
  		$res = $query->set($this->values)->execute($this->write_connection);
  
  		// put back any relations settings
  		$this->relations = $tmp_relations;
  
  		// Update can affect 0 rows when input types are different but outcome stays the same
  		return $res >= 0;
  	}
code: public function update()
  	{
  		// temporary disable relations
  		$tmp_relations   = $this->relations;
  		$this->relations = array();
  
  		// Build query and execute update
  		$query = \DB::update(call_user_func($this->model.'::table'));
  		$tmp   = $this->build_query($query, array(), 'update');
  		$query = $tmp['query'];
  		$res = $query->set($this->values)->execute($this->write_connection);
  
  		// put back any relations settings
  		$this->relations = $tmp_relations;
  
  		// Update can affect 0 rows when input types are different but outcome stays the same
  		return $res >= 0;
  	}
code_tokens: public function update ( ) { // temporary disable relations $ tmp_relations = $ this -> relations ; $ this -> relations = array ( ) ; // Build query and execute update $ query = \ DB :: update ( call_user_func ( $ this -> model . '::table' ) ) ; $ tmp = $ this -> build_query ( $ query , array ( ) , 'update' ) ; $ query = $ tmp [ 'query' ] ; $ res = $ query -> set ( $ this -> values ) -> execute ( $ this -> write_connection ) ; // put back any relations settings $ this -> relations = $ tmp_relations ; // Update can affect 0 rows when input types are different but outcome stays the same return $ res >= 0 ; }
docstring: Run UPDATE with the current values
  
  @return  bool  success of update operation
docstring_tokens: Run UPDATE with the current values